ckolivas / lrzip

Long Range Zip

Home Page:http://lrzip.kolivas.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

warning: 'PAGE_SIZE' macro redefined

leleliu008 opened this issue · comments

lrzip_private.h:266:10: warning: 'PAGE_SIZE' macro redefined [-Wmacro-redefined]
# define PAGE_SIZE (4096)/usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/sys/user.h
         ^
/usr/local/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/sys/user.h:38:9: note: previous definition is here
#define PAGE_SIZE 4096
        ^
:38:9: note: previous definition is here
#define PAGE_SIZE 4096

PAGE_SIZE has been predefined in Android-NDK.

relavent code

so here should check PAGE_SIZE if already defined

#ifndef PAGE_SIZE
    #ifdef _SC_PAGE_SIZE
        #define PAGE_SIZE (sysconf(_SC_PAGE_SIZE))
    #else
        #define PAGE_SIZE (4096)
    #endif
#endif

Fixed in master.