1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 23:22:37 +02:00

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

Corresponding to flashrom svn r1950.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
Stefan Tauner 2016-03-13 12:57:03 +00:00
parent 57cdd6ba66
commit fc3ecc2a81
2 changed files with 2 additions and 2 deletions

View File

@ -926,7 +926,7 @@ endif
ifneq ($(NEED_POSIX_SOCKETS), ) ifneq ($(NEED_POSIX_SOCKETS), )
ifeq ($(TARGET_OS), SunOS) ifeq ($(TARGET_OS), SunOS)
LIBS += -lsocket LIBS += -lsocket -lnsl
endif endif
endif endif

View File

@ -170,7 +170,7 @@ int main(int argc, char *argv[])
usage(argv, "Seeking to the end of the file failed"); usage(argv, "Seeking to the end of the file failed");
#ifdef HAVE_MMAP #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) if (buf == (void *) -1)
#endif #endif
{ {