]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4610 pt2: compile errors on Solaris 11.3 with Oracle Studio 12.5
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 7 Nov 2016 07:37:33 +0000 (20:37 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 7 Nov 2016 07:37:33 +0000 (20:37 +1300)
compat/compat.h
compat/os/solaris.h

index 00714ed4fdb57f5c6e709dbde08f74627fd526c3..32aee5884b566c30bdd45da96d81ce2e789d7f8d 100644 (file)
 /******************************************************/
 #include "compat/osdetect.h"
 
-/* ugly hack. But we need to set this REALLY soon in the header */
-#if _SQUID_SOLARIS_ && !defined(__GNUC__) && !defined(__GNUG__)
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-#ifndef _XOPEN_SOURCE
-#define _XOPEN_SOURCE 1
-#endif
-#ifndef _XOPEN_SOURCE_EXTENDED
-#define _XOPEN_SOURCE_EXTENDED 1
-#endif
-#endif
-
 /* Solaris 10 has a broken definition for minor_t in IPFilter compat.
  * We must pre-define before doing anything with OS headers so the OS
  * do not. Then un-define it before using the IPFilter *_compat.h headers.
index 7e8ad463cf54636805169d5fa3eea729562995dc..de946e8127554bd842f51c70a28cff20dd5f0138 100644 (file)
@@ -48,6 +48,11 @@ typedef union {
 #include <sys/resource.h>
 SQUIDCEXTERN int getrusage(int, struct rusage *);
 
+// 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>
+
 /**
  * prototypes for system function missing from system includes
  * on some Solaris systems.