]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - compat/os/solaris.h
SourceFormat Enforcement
[thirdparty/squid.git] / compat / os / solaris.h
index 750e1652bc77269697d683103ada25b8f90116b8..793e2662498cbe4ef2ff6ca054854fa69229b16c 100644 (file)
@@ -1,10 +1,8 @@
 #ifndef SQUID_OS_SOLARIS_H
 #define SQUID_OS_SOLARIS_H
 
-
 #if _SQUID_SOLARIS_
 
-
 /*
  * ugly hack. System headers require wcsstr, but don't define it.
  */
@@ -85,6 +83,16 @@ SQUIDCEXTERN int gethostname(char *, int);
 #include "compat/os/opensolaris_10_netdb.h"
 #endif
 
+/* Solaris 10 lacks SUN_LEN */
+#if !defined(SUN_LEN)
+#define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+#endif
+
+/* Soaris 10 does not define POSIX AF_LOCAL, but does define the Unix name */
+#if !defined(AF_LOCAL)
+#define AF_LOCAL AF_UNIX
+#endif
+
 /* Solaris lacks paths.h by default */
 #if HAVE_PATHS_H
 #include <paths.h>
@@ -93,5 +101,8 @@ SQUIDCEXTERN int gethostname(char *, int);
 #define _PATH_DEVNULL "/dev/null"
 #endif
 
+/* Solaris 10 does not define strsep() */
+#include "compat/strsep.h"
+
 #endif /* _SQUID_SOLARIS_ */
 #endif /* SQUID_OS_SOALRIS_H */