Merge branch 'master' of github.com:sahlberg/libnfs

libnfs-4.0.0-vitalif
Ronnie Sahlberg 2018-07-03 18:58:50 +10:00
commit 37d49807ba
2 changed files with 4 additions and 1 deletions

View File

@ -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})

View File

@ -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);