--- src/malloc_hook_mmap_linux.h	2015-08-26 17:40:38.296731949 +0200
+++ src/malloc_hook_mmap_linux.h	2015-08-26 17:40:10.768731370 +0200
@@ -40,6 +40,7 @@
 # error Should only be including malloc_hook_mmap_linux.h on linux systems.
 #endif
 
+#include <fcntl.h>
 #include <unistd.h>
 #include <syscall.h>
 #include <sys/mman.h>
@@ -135,6 +135,7 @@
 
 // Make sure mmap doesn't get #define'd away by <sys/mman.h>
 # undef mmap
+# undef mmap64
 
 extern "C" {
   void* mmap64(void *start, size_t length, int prot, int flags,
@@ -202,7 +203,7 @@
   return result;
 }
 
-#ifndef __UCLIBC__
+#if defined(__GLIBC__)
 // libc's version:
 extern "C" void* __sbrk(ptrdiff_t increment);
 
