aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2013-04-16 18:12:02 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2013-04-16 18:12:02 +0000
commit63c8958f1b525fa8b68eedaf96b9b702ea93815e (patch)
tree9f05eea1e3d9f80df92041ebd1ddeb02400af855
parent3ff81c6e4886afff8c78a3f602377bd1339f1b44 (diff)
Notes
-rw-r--r--comms/openobex/files/patch-lib_cloexec.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/comms/openobex/files/patch-lib_cloexec.h b/comms/openobex/files/patch-lib_cloexec.h
new file mode 100644
index 000000000000..23625cd0bfcf
--- /dev/null
+++ b/comms/openobex/files/patch-lib_cloexec.h
@@ -0,0 +1,19 @@
+--- lib/cloexec.h.orig 2012-03-26 20:25:19.000000000 +0200
++++ lib/cloexec.h 2013-04-11 16:12:55.161482749 +0200
+@@ -22,6 +22,7 @@
+ #ifndef _WIN32
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <sys/param.h>
+ #include <fcntl.h>
+ static __inline void fcntl_cloexec(socket_t fd)
+ {
+@@ -55,7 +56,7 @@
+ static __inline socket_t accept_cloexec(socket_t sockfd, struct sockaddr *addr,
+ socklen_t *addrlen)
+ {
+-#ifdef SOCK_CLOEXEC
++#if defined(SOCK_CLOEXEC) && !defined(__FreeBSD__)
+ return accept4(sockfd, addr, addrlen, SOCK_CLOEXEC);
+ #else
+ socket_t fd = accept(sockfd, addr, addrlen);