From 2f9ff022584d7d00857f52f5ea87c8e4c82d9e4e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 17 May 2011 18:26:46 -0700 Subject: [PATCH] page: redefine PAGE_* macros Saw this on sid i386: msg/SimpleMessenger.cc: In function 'void alloc_aligned_buffer(ceph::bufferlist& , int, int)': msg/SimpleMessenger.cc:1782:14: error: '__sysconf' was not declared in this scop e msg/SimpleMessenger.cc:1789:23: error: '__sysconf' was not declared in this scop Some header is clobbering out PAGE_* macros. Make our header more forceful. Signed-off-by: Sage Weil --- src/include/page.h | 11 +++++------ src/msg/SimpleMessenger.cc | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/include/page.h b/src/include/page.h index ce4f985676fec..a1a50503e2316 100644 --- a/src/include/page.h +++ b/src/include/page.h @@ -8,14 +8,13 @@ namespace ceph { extern unsigned _page_shift; } -#ifndef PAGE_SIZE +#undef PAGE_SIZE #define PAGE_SIZE ceph::_page_size -#endif -#ifndef PAGE_MASK + +#undef PAGE_MASK #define PAGE_MASK ceph::_page_mask -#endif -#ifndef PAGE_SHIFT + +#undef PAGE_SHIFT #define PAGE_SHIFT ceph::_page_shift -#endif #endif diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc index d680a63b880ea..75df7c562e8a1 100644 --- a/src/msg/SimpleMessenger.cc +++ b/src/msg/SimpleMessenger.cc @@ -37,6 +37,7 @@ #include "common/Timer.h" #include "common/errno.h" #include "common/safe_io.h" +#include "include/page.h" #define DOUT_SUBSYS ms #undef dout_prefix -- 2.39.5