2015-07-28 16:48, Zhigang Lu: > This patch fixes a build error caused by undeclared PAGE_SIZE when > compiling for non-X86 arches. On some arches, PAGE_SIZE is not fixed > so that header files do not define it. A better way to get it is > via sysconf(3) or getpagesize(2). > > Fixes: 540a211084a7 ("bnx2x: driver core")
Thanks for fixing it. > +#define PAGE_SIZE (sysconf(_SC_PAGESIZE)) To avoid conflict with system headers, it would be better to prefix the constant. Ideally, we should add RTE_PAGESIZE in EAL and cleanup every usage of sysconf(_SC_PAGESIZE) and getpagesize.