From: robertc <> Date: Sun, 17 Aug 2003 19:42:04 +0000 (+0000) Subject: Summary: gethostname definition on Solaris broken. X-Git-Tag: SQUID_3_0_PRE4~1246 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8ef2a76e2e647c90668997b596b0cc44c01b671;p=thirdparty%2Fsquid.git Summary: gethostname definition on Solaris broken. Keywords: The C++ compiler detection seems to allow the native declarations of gethostname to function on Solaris. Copy that logic into protos.h so that we don't conflict, but still have our declaration should it be needed. --- diff --git a/src/protos.h b/src/protos.h index 42ed67e2f5..ff8c5c6b2b 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.490 2003/08/10 11:00:44 robertc Exp $ + * $Id: protos.h,v 1.491 2003/08/17 13:42:04 robertc Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -1041,8 +1041,11 @@ SQUIDCEXTERN RemovalPolicy *createRemovalPolicy(RemovalPolicySettings * settings SQUIDCEXTERN int getrusage(int, struct rusage *); SQUIDCEXTERN int getpagesize(void); +#if !defined(_XPG4_2) && !(defined(__EXTENSIONS__) || \ + (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE))) SQUIDCEXTERN int gethostname(char *, int); #endif +#endif /* * hack to allow snmp access to the statistics counters