[flashrom] [PATCH] Fix compilation on SunOS.
Stefan Tauner
stefan.tauner at alumni.tuwien.ac.at
Sun Mar 13 00:05:01 CET 2016
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 at alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
---
Makefile | 2 +-
util/ich_descriptors_tool/ich_descriptors_tool.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 927105d..f94ec7b 100644
--- a/Makefile
+++ b/Makefile
@@ -926,7 +926,7 @@ endif
ifneq ($(NEED_POSIX_SOCKETS), )
ifeq ($(TARGET_OS), SunOS)
-LIBS += -lsocket
+LIBS += -lsocket -lnsl
endif
endif
diff --git a/util/ich_descriptors_tool/ich_descriptors_tool.c b/util/ich_descriptors_tool/ich_descriptors_tool.c
index c3d9ba1..ad3b6f0 100644
--- a/util/ich_descriptors_tool/ich_descriptors_tool.c
+++ b/util/ich_descriptors_tool/ich_descriptors_tool.c
@@ -170,7 +170,7 @@ int main(int argc, char *argv[])
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
{
--
Kind regards, Stefan Tauner
More information about the flashrom
mailing list