]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4661: compile error 'warning: _XPG4_2 redefined' with GCC on Solaris 10
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 28 Jan 2017 08:51:25 +0000 (21:51 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 28 Jan 2017 08:51:25 +0000 (21:51 +1300)
compat/os/solaris.h

index adc630fbe2315f9816d3b723d3a959084426727d..dd738b4dd1d30720f564b741abc44a0e57c3a7d7 100644 (file)
@@ -48,10 +48,12 @@ typedef union {
 #include <sys/resource.h>
 SQUIDCEXTERN int getrusage(int, struct rusage *);
 
+#if defined(__SUNPRO_CC)
 // Solaris 11 needs this before <sys/socket.h> to get the definition for msg_control
 // and possibly other type definitions we dont know about specifically
 #define _XPG4_2 1
 #include <sys/socket.h>
+#endif
 
 /**
  * prototypes for system function missing from system includes