Merge branch 'master' of github.com:sahlberg/libnfs
commit
37d49807ba
|
@ -9,6 +9,7 @@ set(SOURCES init.c
|
|||
|
||||
add_library(nfs ${SOURCES})
|
||||
target_link_libraries(nfs PUBLIC ${core_DEPENDS})
|
||||
target_include_directories(nfs PUBLIC ../include)
|
||||
set_target_properties(nfs PROPERTIES
|
||||
VERSION ${PROJECT_VERSION}
|
||||
SOVERSION ${SOVERSION})
|
||||
|
|
|
@ -93,12 +93,14 @@ static int
|
|||
create_socket(int domain, int type, int protocol)
|
||||
{
|
||||
#ifdef SOCK_CLOEXEC
|
||||
/* Linux-specific extension (since 2.6.27): set the
|
||||
#ifdef __linux__
|
||||
/* Linux-specific extension (since 2.6.27): set the
|
||||
close-on-exec flag on all sockets to avoid leaking file
|
||||
descriptors to child processes */
|
||||
int fd = socket(domain, type|SOCK_CLOEXEC, protocol);
|
||||
if (fd >= 0 || errno != EINVAL)
|
||||
return fd;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return socket(domain, type, protocol);
|
||||
|
|
Loading…
Reference in New Issue