From b8ef2a76e2e647c90668997b596b0cc44c01b671 Mon Sep 17 00:00:00 2001 From: robertc <> Date: Sun, 17 Aug 2003 19:42:04 +0000 Subject: [PATCH] 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. --- src/protos.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.47.3