From b6765c03fa8bce1f0838740c3f1f270de21a21a3 Mon Sep 17 00:00:00 2001 From: henri Date: Mon, 24 Dec 2012 23:29:18 +0000 Subject: [PATCH] Fixed SUN_LEN definition in nsock.h. Added missing parenthesis to nsock's SUN_LEN for platforms where the macro isn't defined. Report and patch by Conor McCarthy --- nsock/include/nsock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nsock/include/nsock.h b/nsock/include/nsock.h index 33eb1e5a8..3d01cc13f 100644 --- a/nsock/include/nsock.h +++ b/nsock/include/nsock.h @@ -84,8 +84,8 @@ #ifndef SUN_LEN #include -# define SUN_LEN(ptr) (sizeof(*(ptr)) - sizeof((ptr)->sun_path)) \ - + strlen ((ptr)->sun_path)) +#define SUN_LEN(ptr) ((sizeof(*(ptr)) - sizeof((ptr)->sun_path)) \ + + strlen((ptr)->sun_path)) #endif #endif /* HAVE_SYS_UN_H */