[utils] Add check for ANDROID_UNIFIED_HEADERS to mono-compiler.h (#5742)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Mon, 9 Oct 2017 23:08:17 +0000 (01:08 +0200)
committerGitHub <noreply@github.com>
Mon, 9 Oct 2017 23:08:17 +0000 (01:08 +0200)
commit4058c2be43ec605cdcc57e9d678251339349cb5f
tree879e1606a3b61247845a07d296106088775febbe
parentd2e60f48b66508995e8091ab68c6b9dd2c67ecca
[utils] Add check for ANDROID_UNIFIED_HEADERS to mono-compiler.h (#5742)

https://github.com/mono/mono/pull/5680 added mmap/sendfile prototypes
but we should only use those when ANDROID_UNIFIED_HEADERS is defined
to avoid getting errors like:

```
/Users/alexander/dev/xamarin-android/external/mono/mono/utils/mono-compiler.h:157:7: error: conflicting types for 'mmap'
void* mmap (void*, size_t, int, int, int, __mono_off32_t);
        ^
/Users/alexander/android-toolchain/toolchains/arm-linux-androideabi-clang/bin/../sysroot/usr/include/sys/mman.h:47:15: note: previous declaration is here
extern void*  mmap(void *, size_t, int, int, int, off_t);
                ^

/Users/alexander/dev/xamarin-android/external/mono/mono/utils/mono-compiler.h:166:9: error: conflicting types for 'sendfile'
ssize_t sendfile (int out_fd, int in_fd, __mono_off32_t* offset, size_t count);
        ^
/Users/alexander/android-toolchain/toolchains/arm-linux-androideabi-clang/bin/../sysroot/usr/include/sys/sendfile.h:36:16: note: previous declaration is here
extern ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count);
```
mono/utils/mono-compiler.h