jvrao commented on a change in pull request #80: BOOKKEEPER-816: use native 
fallocate to improve journal allocation
URL: https://github.com/apache/bookkeeper/pull/80#discussion_r140644361
 
 

 ##########
 File path: 
bookkeeper-server/src/main/native/src/org/apache/bookkeeper/util/NativeIO.c
 ##########
 @@ -22,9 +22,17 @@
 #include <fcntl.h>
 #include <sys/syscall.h>
 #include <sys/types.h>
-#include <asm-x86_64/unistd.h>
+#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || 
(defined(__APPLE__) && defined(__MACH__)))
+  /* UNIX-style OS. ------------------------------------------- */
+  #include <unistd.h>
+  #if (defined(__unit__) || defined(__unix)) && defined(__x86_64__)
+    #include <asm-x86_64/unistd.h>
+  #endif
+#endif
 #include "config.h"
 
+
+
 #if defined(HAVE_FALLOCATE)
 #  define my_fallocate fallocate
 
 Review comment:
   format for define? spaces at the beginning
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to