From: Mathieu Desnoyers Date: Thu, 24 May 2012 14:19:46 +0000 (-0400) Subject: align.h: support cygwin page size X-Git-Tag: v2.1.0-rc1~79 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8e3484cf85747d476302a2049dfa9741cc128b32;p=lttng-ust.git align.h: support cygwin page size Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/align.h b/include/lttng/align.h index 9154051e..f2163e08 100644 --- a/include/lttng/align.h +++ b/include/lttng/align.h @@ -19,8 +19,12 @@ #include #include +#include +#ifndef PAGE_SIZE /* Cygwin limits.h defines its own PAGE_SIZE */ #define PAGE_SIZE sysconf(_SC_PAGE_SIZE) +#endif + #define PAGE_MASK (~(PAGE_SIZE - 1)) #define __ALIGN_MASK(v, mask) (((v) + (mask)) & ~(mask)) #define ALIGN(v, align) __ALIGN_MASK(v, (typeof(v)) (align) - 1)