Prepare Mono for Android NDK with unified headers (#5680)
[mono.git] / support / sys-sendfile.c
index 976b01d7870fae07970d9bfe6b088f4f06e928f7..794341b58999b7bb363e97daa99633d53675b661 100644 (file)
@@ -7,9 +7,13 @@
  * Copyright (C) 2004 Jonathan Pryor
  */
 
+#include <config.h>
+
 #include <sys/types.h>
 #include <errno.h>
 
+#include "mono/utils/mono-compiler.h"
+#include "map.h"
 #include "mph.h"
 
 #ifdef HAVE_SYS_SENDFILE_H
@@ -28,7 +32,12 @@ Mono_Posix_Syscall_sendfile (int out_fd, int in_fd, mph_off_t *offset, mph_size_
 
        _offset = *offset;
 
+#if defined(HOST_DARWIN) || defined(HOST_BSD)
+       /* The BSD version has 6 arguments */
+       g_assert_not_reached ();
+#else
        r = sendfile (out_fd, in_fd, &_offset, (size_t) count);
+#endif
 
        *offset = _offset;