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 <lha@h5l.org>
This commit is contained in:

committed by
Love Hornquist Astrand

parent
c6fb9428dd
commit
0225db7152
@@ -1072,7 +1072,7 @@ void
|
|||||||
rk_qsort(void *, size_t, size_t, int (*)(const void *, const void *));
|
rk_qsort(void *, size_t, size_t, int (*)(const void *, const void *));
|
||||||
#endif
|
#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
|
#undef socket
|
||||||
#define socket(_fam,_type,_prot) rk_socket(_fam,_type,_prot)
|
#define socket(_fam,_type,_prot) rk_socket(_fam,_type,_prot)
|
||||||
int ROKEN_LIB_FUNCTION rk_socket(int, int, int);
|
int ROKEN_LIB_FUNCTION rk_socket(int, int, int);
|
||||||
|
Reference in New Issue
Block a user