From bc8dfb10dd4a5122a66617fe58e7ffb73c2e67ab Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 9 Aug 2009 10:56:07 +1200 Subject: [PATCH] Author: Alin Nastac Cleanup: deprecate ugly hack for sys/capability.h Needed once to prevent build clashes between libc and sys/capabilility.h headers. As of libcap2.16 that is no longer the case and in fact prevents a clean build. Left in libcompat but removed from active build until its clear whether full erasure is possible or if some systems still need it. --- compat/os/linux.h | 20 ++++++++++++++++++++ src/tools.cc | 11 ----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/compat/os/linux.h b/compat/os/linux.h index 947de9870a..27ea415b14 100644 --- a/compat/os/linux.h +++ b/compat/os/linux.h @@ -27,5 +27,25 @@ #endif +/* + * sys/capability.h is only needed in Linux apparently. + * + * HACK: Ugly glue to get around linux header madness colliding with glibc + * NP: if you need to use the hack labeled MAYBE_DEAD please report to + * the developers. + */ +#if HAVE_SYS_CAPABILITY_H + +#if MAYBE_DEAD +#undef _POSIX_SOURCE +#define _LINUX_TYPES_H +#define _LINUX_FS_H +typedef uint32_t __u32; +#endif + +#include +#endif /* HAVE_SYS_CAPABILITY_H */ + + #endif /* _SQUID_LINUX_ */ #endif /* SQUID_OS_LINUX_H */ diff --git a/src/tools.cc b/src/tools.cc index e83e5159a4..311f007fc3 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -41,17 +41,6 @@ #include "SquidTime.h" #include "ip/IpIntercept.h" -#ifdef _SQUID_LINUX_ -#if HAVE_SYS_CAPABILITY_H -#undef _POSIX_SOURCE -/* Ugly glue to get around linux header madness colliding with glibc */ -#define _LINUX_TYPES_H -#define _LINUX_FS_H -typedef uint32_t __u32; -#include -#endif -#endif - #if HAVE_SYS_PRCTL_H #include #endif -- 2.47.2