[argyllcms] [FreeBSD, patch] spectro/webwin.c

  • From: Boris Samorodov <bsam@xxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Fri, 22 Feb 2013 16:50:58 +0400

Hi All,

when building argillcms at FreeBSD I get the error (compiled
with clang, but gcc produces almost the same error and diagnistic
message):
[...]
Cc_ spectro/webwin.o
spectro/webwin.c:372:15: error: use of undeclared identifier 'AF_INET'
                                inet_ntop(AF_INET, tmpAddrPtr, abuf,
INET_ADDRSTRLEN);
                                          ^
1 error generated.

        cc -c -o spectro/webwin.o -DUNIX -D_THREAD_SAFE -pipe -O2
-DARGYLLCMS -Ispectro -Ih -Inumlib -Iicc -Icgats -Irspl -Ixicc -Igamut
-Ispectro -Iplot -Ilibusb -Iucmm -I/usr/local/include
-I/usr/local/include spectro/webwin.c

...failed Cc_ spectro/webwin.o ...
[...]

The attached patch fixes the build.

HTH
-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
--- spectro/webwin.c.orig       2013-02-22 16:43:20.314459917 +0400
+++ spectro/webwin.c    2013-02-22 16:43:56.578463866 +0400
@@ -23,7 +23,10 @@
 # include <ifaddrs.h>
 # include <netinet/in.h> 
 # include <arpa/inet.h>
-#endif
+#ifdef __FreeBSD__
+#  include <sys/socket.h>
+#endif /* __FreeBSD__ */
+#endif /* NT */
 #include "copyright.h"
 #include "aconfig.h"
 #include "icc.h"

Other related posts:

  • » [argyllcms] [FreeBSD, patch] spectro/webwin.c - Boris Samorodov