]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability: define SUN_LEN() for Solaris
authorAlexander Lukyanov <lav@netis.ru>
Thu, 15 Mar 2012 12:36:35 +0000 (06:36 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 15 Mar 2012 12:36:35 +0000 (06:36 -0600)
compat/os/solaris.h

index 750e1652bc77269697d683103ada25b8f90116b8..3dcbe5d88007f85fff244c8faa0917a8bf04b318 100644 (file)
@@ -85,6 +85,12 @@ 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
+
+
 /* Solaris lacks paths.h by default */
 #if HAVE_PATHS_H
 #include <paths.h>