From 2d6b4a82d6ea8152afce8049a94204f40abfd1a7 Mon Sep 17 00:00:00 2001 From: Alexander Lukyanov Date: Thu, 15 Mar 2012 06:36:35 -0600 Subject: [PATCH] Portability: define SUN_LEN() for Solaris --- compat/os/solaris.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compat/os/solaris.h b/compat/os/solaris.h index 750e1652bc..3dcbe5d880 100644 --- a/compat/os/solaris.h +++ b/compat/os/solaris.h @@ -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 -- 2.47.2