diff options
author | Christian Ambach <ambi@samba.org> | 2013-11-22 05:15:13 +0100 |
---|---|---|
committer | Christian Ambach <ambi@samba.org> | 2013-12-07 16:45:15 +0100 |
commit | 100f324fcd0db19e3db9a9776377a0391e82f775 (patch) | |
tree | 4fb9a4e94cde8ed92fc5503dff8d161f859bc0a4 | |
parent | 5e2f59dce350822495ac59dbf852cdf06ff8e897 (diff) | |
download | samba-100f324fcd0db19e3db9a9776377a0391e82f775.tar.gz samba-100f324fcd0db19e3db9a9776377a0391e82f775.tar.xz samba-100f324fcd0db19e3db9a9776377a0391e82f775.zip |
lib/socket_wrapper fix compilation when libreplace is not around
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
-rw-r--r-- | lib/socket_wrapper/socket_wrapper.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c index 3c9d0f1a9c2..a8369ad49dc 100644 --- a/lib/socket_wrapper/socket_wrapper.c +++ b/lib/socket_wrapper/socket_wrapper.c @@ -56,7 +56,9 @@ #include <sys/stat.h> #include <sys/socket.h> #include <sys/ioctl.h> +#ifdef HAVE_SYS_FILIO_H #include <sys/filio.h> +#endif #include <errno.h> #include <sys/un.h> #include <netinet/in.h> @@ -67,9 +69,27 @@ #include <string.h> #include <stdio.h> #include <stdint.h> +#include <arpa/inet.h> + +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif + +#ifndef discard_const_p +#define discard_const_p(type, ptr) ((type *)discard_const(ptr)) +#endif + +/** + * zero a structure + */ +#ifndef ZERO_STRUCT +#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x)) +#endif #endif /* HAVE_LIBREPLACE */ +#include "socket_wrapper.h" + #ifndef _PUBLIC_ #define _PUBLIC_ #endif |