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
This commit is contained in:
henri 2012-12-24 23:29:18 +00:00
parent f8da38fab5
commit b6765c03fa

View file

@ -84,8 +84,8 @@
#ifndef SUN_LEN
#include <string.h>
# 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 */