From: Amos Jeffries Date: Mon, 7 Nov 2016 07:37:33 +0000 (+1300) Subject: Bug 4610 pt2: compile errors on Solaris 11.3 with Oracle Studio 12.5 X-Git-Tag: SQUID_4_0_17~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3fd5ec4cbf161f84fef5d8c9a7bc55b2140954e;p=thirdparty%2Fsquid.git Bug 4610 pt2: compile errors on Solaris 11.3 with Oracle Studio 12.5 --- diff --git a/compat/compat.h b/compat/compat.h index 00714ed4fd..32aee5884b 100644 --- a/compat/compat.h +++ b/compat/compat.h @@ -29,19 +29,6 @@ /******************************************************/ #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. diff --git a/compat/os/solaris.h b/compat/os/solaris.h index 7e8ad463cf..de946e8127 100644 --- a/compat/os/solaris.h +++ b/compat/os/solaris.h @@ -48,6 +48,11 @@ typedef union { #include SQUIDCEXTERN int getrusage(int, struct rusage *); +// Solaris 11 needs this before to get the definition for msg_control +// and possibly other type definitions we dont know about specifically +#define _XPG4_2 1 +#include + /** * prototypes for system function missing from system includes * on some Solaris systems.