/******************************************************/
#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.
#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.