From 0225db7152dd224471ec98afd5101186322c0d35 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 2 Oct 2010 20:58:02 +1000 Subject: [PATCH] Don't redefine socket() if socket_wrapper is already in use In Samba, we may have already included socket_wrapper.h at this point Andrew Bartlett Signed-off-by: Love Hornquist Astrand --- lib/roken/roken.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index d6e9024bd..0c0dd2003 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -1072,7 +1072,7 @@ void rk_qsort(void *, size_t, size_t, int (*)(const void *, const void *)); #endif -#if defined(__linux__) && defined(SOCK_CLOEXEC) && !defined(SOCKET_WRAPPER_REPLACE) +#if defined(__linux__) && defined(SOCK_CLOEXEC) && !defined(SOCKET_WRAPPER_REPLACE) && !defined(__SOCKET_WRAPPER_H__) #undef socket #define socket(_fam,_type,_prot) rk_socket(_fam,_type,_prot) int ROKEN_LIB_FUNCTION rk_socket(int, int, int);