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_r140644333
########## 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 Review comment: This looks strange. If you include asm-x86_64/unistd.h do you still need unistd.h? Also based on the system unistd.h should point to the right arch based unistd.h isn't it? ---------------------------------------------------------------- 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
