aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/unix/unix_efile.c
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-11-16 16:02:57 +0100
committerLukas Larsson <[email protected]>2011-12-01 14:10:04 +0100
commita0d3a833cbd70971aa0c79da9853502e6631524d (patch)
treecf68ee8ba0621bfbc496bb95839a3a88f719f6e2 /erts/emulator/drivers/unix/unix_efile.c
parenta508d712553761d3cdc69d5e14c09ba3a6530d7a (diff)
downloadotp-a0d3a833cbd70971aa0c79da9853502e6631524d.tar.gz
otp-a0d3a833cbd70971aa0c79da9853502e6631524d.tar.bz2
otp-a0d3a833cbd70971aa0c79da9853502e6631524d.zip
Add ifdef's for HAVE_SENDFILE
Diffstat (limited to 'erts/emulator/drivers/unix/unix_efile.c')
-rw-r--r--erts/emulator/drivers/unix/unix_efile.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c
index 14b7a5cffa..dc118c9b9f 100644
--- a/erts/emulator/drivers/unix/unix_efile.c
+++ b/erts/emulator/drivers/unix/unix_efile.c
@@ -33,7 +33,7 @@
#include <sys/types.h>
#include <sys/uio.h>
#endif
-#if defined(__linux__) || (defined(__sun) && defined(__SVR4))
+#if defined(HAVE_SENDFILE) && (defined(__linux__) || (defined(__sun) && defined(__SVR4)))
#include <sys/sendfile.h>
#endif
@@ -1530,12 +1530,4 @@ efile_sendfile(Efile_error* errInfo, int in_fd, int out_fd,
return check_error(retval, errInfo);
#endif
}
-#else /* no sendfile() */
-int
-efile_sendfile(Efile_error* errInfo, int in_fd, int out_fd,
- off_t *offset, size_t *count)
-{
- errno = ENOTSUP;
- return check_error(-1, errInfo);
-}
-#endif
+#endif /* HAVE_SENDFILE */