From: Mathieu Desnoyers Date: Thu, 24 May 2012 14:19:46 +0000 (-0400) Subject: align.h: support cygwin page size X-Git-Url: http://git.lttng.org/?p=lttng-ust.git;a=commitdiff_plain;h=b048179fd26bff2006272e8c07971c17b820b64b align.h: support cygwin page size commit 8e3484cf85747d476302a2049dfa9741cc128b32 upstream. Signed-off-by: Mathieu Desnoyers Signed-off-by: Christian Babeux --- diff --git a/include/lttng/align.h b/include/lttng/align.h index 913327a8..4b3c1709 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)