aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-01-27 11:49:22 +0100
committerLukas Larsson <[email protected]>2016-01-27 11:49:22 +0100
commitaf341c420e145f006ed3d9fc9c745ea217689c04 (patch)
treeef696166f1bd91b720b3ba612311c08391527153 /erts/emulator
parent9722388b2fcec9b7f7e5680335e1bd6392ef11fc (diff)
parentb721bebe663ca3abc747591b28726a367bdb9758 (diff)
downloadotp-af341c420e145f006ed3d9fc9c745ea217689c04.tar.gz
otp-af341c420e145f006ed3d9fc9c745ea217689c04.tar.bz2
otp-af341c420e145f006ed3d9fc9c745ea217689c04.zip
Merge branch 'theom/freebsd-sendfile-patch-2/OTP-13271' into maint
* theom/freebsd-sendfile-patch-2/OTP-13271: erts: Fix sendfile:ing of large files on FreeBSD
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/drivers/unix/unix_efile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c
index 46eccc6568..00da48b107 100644
--- a/erts/emulator/drivers/unix/unix_efile.c
+++ b/erts/emulator/drivers/unix/unix_efile.c
@@ -39,6 +39,11 @@
#ifdef HAVE_SYS_UIO_H
#include <sys/types.h>
#include <sys/uio.h>
+#if defined(HAVE_SENDFILE) && (defined(__FreeBSD__) || defined(__DragonFly__))
+/* Need to define __BSD_VISIBLE in order to expose prototype of sendfile */
+#define __BSD_VISIBLE 1
+#include <sys/socket.h>
+#endif
#endif
#if defined(HAVE_SENDFILE) && (defined(__linux__) || (defined(__sun) && defined(__SVR4)))
#include <sys/sendfile.h>