From: Amos Jeffries Date: Sat, 28 Jan 2017 08:51:25 +0000 (+1300) Subject: Bug 4661: compile error 'warning: _XPG4_2 redefined' with GCC on Solaris 10 X-Git-Tag: M-staged-PR71~293 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1afd9a138367bd7a95ca905eda8941cacae9b8d;p=thirdparty%2Fsquid.git Bug 4661: compile error 'warning: _XPG4_2 redefined' with GCC on Solaris 10 --- diff --git a/compat/os/solaris.h b/compat/os/solaris.h index adc630fbe2..dd738b4dd1 100644 --- a/compat/os/solaris.h +++ b/compat/os/solaris.h @@ -48,10 +48,12 @@ typedef union { #include SQUIDCEXTERN int getrusage(int, struct rusage *); +#if defined(__SUNPRO_CC) // 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 +#endif /** * prototypes for system function missing from system includes