]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: gethostname definition on Solaris broken.
authorrobertc <>
Sun, 17 Aug 2003 19:42:04 +0000 (19:42 +0000)
committerrobertc <>
Sun, 17 Aug 2003 19:42:04 +0000 (19:42 +0000)
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

index 42ed67e2f5328046b5da7ccef12707aaf194b5e1..ff8c5c6b2b63f152e0f4c82f5df2ddcf50e0a279 100644 (file)
@@ -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