Author: stefanct Date: Sun Mar 13 13:57:03 2016 New Revision: 1950 URL: http://flashrom.org/trac/flashrom/changeset/1950
Log: Fix compilation on SunOS.
This came up when I was testing if building on SunOS still works on the buildbot's instance of OmniOS r151014 which is based on illumos.
The fix is - to link against libnsl - a small C type fix in ich_descriptor_tool
Signed-off-by: Stefan Tauner stefan.tauner@alumni.tuwien.ac.at Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Modified: trunk/Makefile trunk/util/ich_descriptors_tool/ich_descriptors_tool.c
Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Sat Mar 12 20:49:14 2016 (r1949) +++ trunk/Makefile Sun Mar 13 13:57:03 2016 (r1950) @@ -926,7 +926,7 @@
ifneq ($(NEED_POSIX_SOCKETS), ) ifeq ($(TARGET_OS), SunOS) -LIBS += -lsocket +LIBS += -lsocket -lnsl endif endif
Modified: trunk/util/ich_descriptors_tool/ich_descriptors_tool.c ============================================================================== --- trunk/util/ich_descriptors_tool/ich_descriptors_tool.c Sat Mar 12 20:49:14 2016 (r1949) +++ trunk/util/ich_descriptors_tool/ich_descriptors_tool.c Sun Mar 13 13:57:03 2016 (r1950) @@ -170,7 +170,7 @@ usage(argv, "Seeking to the end of the file failed");
#ifdef HAVE_MMAP - buf = mmap(NULL, len, PROT_READ, MAP_PRIVATE, fd, 0); + buf = (uint32_t *)mmap(NULL, len, PROT_READ, MAP_PRIVATE, fd, 0); if (buf == (void *) -1) #endif {