From caa03bd0b43a89dcc93397182dc969417f09ba7c Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Wed, 28 Jan 2015 14:29:26 +0100 Subject: hook up rdate --- src/liboutils/outils.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/liboutils') diff --git a/src/liboutils/outils.h b/src/liboutils/outils.h index c949525..ef63a39 100644 --- a/src/liboutils/outils.h +++ b/src/liboutils/outils.h @@ -11,6 +11,12 @@ #define letoh16 le16toh +#ifndef SA_LEN +#define SA_LEN(X) \ + (((struct sockaddr*)(X))->sa_family == AF_INET ? sizeof(struct sockaddr_in) : \ + ((struct sockaddr*)(X))->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr)) +#endif + #include #include -- cgit 1.4.1