Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2012-06-01 15:40:28 +0400
committerZoltan Varga <vargaz@gmail.com>2012-06-01 15:42:04 +0400
commit174de374ff364c808c62e0c2496ec07867f4e86d (patch)
tree1655f9368b947c2ae5af69532c620882a98c16ce /support
parentcd6329937471adbbe8bc9588315eb8bb7fcbefe2 (diff)
Fix implicit function declarations on osx.
Diffstat (limited to 'support')
-rw-r--r--support/sys-mman.c7
-rw-r--r--support/sys-sendfile.c7
2 files changed, 13 insertions, 1 deletions
diff --git a/support/sys-mman.c b/support/sys-mman.c
index 346c97d6df6..256d954fefc 100644
--- a/support/sys-mman.c
+++ b/support/sys-mman.c
@@ -9,6 +9,11 @@
#define _XOPEN_SOURCE 600
+#ifdef PLATFORM_MACOSX
+/* For mincore () */
+#define _DARWIN_C_SOURCE
+#endif
+
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
@@ -106,7 +111,7 @@ Mono_Posix_Syscall_mincore (void *start, mph_size_t length, unsigned char *vec)
{
mph_return_if_size_t_overflow (length);
- return mincore (start, (size_t) length, vec);
+ return mincore (start, (size_t) length, (void*)vec);
}
#ifdef HAVE_POSIX_MADVISE
diff --git a/support/sys-sendfile.c b/support/sys-sendfile.c
index 0750efbbdfc..07607b31f02 100644
--- a/support/sys-sendfile.c
+++ b/support/sys-sendfile.c
@@ -7,6 +7,8 @@
* Copyright (C) 2004 Jonathan Pryor
*/
+#include <config.h>
+
#include <sys/types.h>
#include <errno.h>
@@ -29,7 +31,12 @@ Mono_Posix_Syscall_sendfile (int out_fd, int in_fd, mph_off_t *offset, mph_size_
_offset = *offset;
+#ifdef PLATFORM_MACOSX
+ /* The BSD version has 6 arguments */
+ g_assert_not_reached ();
+#else
r = sendfile (out_fd, in_fd, &_offset, (size_t) count);
+#endif
*offset = _offset;