PAGE_SIZE should not be used from userspace. It is not a
constant on all architectures and new kernels do not export
it to userspace anymore.
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ib66534c31c7134833bf4768d3cc8bbc067b1bab4
Reviewed-on: http://review.whamcloud.com/8877
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
/* Dump a debug log */
void lc_watchdog_dumplog(pid_t pid, void *data);
-#endif /* __KERNEL__ */
+#else /* !__KERNEL__ */
+#include <unistd.h>
+#ifndef PAGE_SIZE
+#define PAGE_SIZE sysconf(_SC_PAGESIZE)
+#endif
+#endif /* !__KERNEL__ */
/* need both kernel and user-land acceptor */
#define LNET_ACCEPTOR_MIN_RESERVED_PORT 512