diff --git a/cdatapack/cdatapack.h b/cdatapack/cdatapack.h --- a/cdatapack/cdatapack.h +++ b/cdatapack/cdatapack.h @@ -29,7 +29,6 @@ #define FULLTEXTINDEXMARK ((index_offset_t) -1) #define NOBASEINDEXMARK ((index_offset_t) -2) typedef uint64_t data_offset_t; -#define ntoh_data_offset ntohll struct _disk_index_entry_t; struct _fanout_table_entry_t; diff --git a/cdatapack/cdatapack.c b/cdatapack/cdatapack.c --- a/cdatapack/cdatapack.c +++ b/cdatapack/cdatapack.c @@ -7,8 +7,6 @@ // cdatapack.c: Datapack implementation in C. // no-check-code -#include "cdatapack/cdatapack.h" - // be64toh is only available if _DEFAULT_SOURCE is defined for glibc >= 2.19, // or _BSD_SOURCE is defined for glibc < 2.19. These have to be defined before // #include . Macros testing glibc version are defined by @@ -20,6 +18,8 @@ #define _BSD_SOURCE #endif /* ndef _BSD_SOURCE */ +#include "cdatapack/cdatapack.h" + #include #include #include @@ -28,6 +28,7 @@ #if defined(__linux__) #include #define ntohll be64toh +#define ntoh_data_offset ntohll // NOTE: we actually want MADV_FREE, because we only want to mark the page as // eligible for immediate reuse while retaining the data. however, the exciting