diff --git a/source4/lib/replace/README b/source4/lib/replace/README index 77558b2ca96..e7b89936c0f 100644 --- a/source4/lib/replace/README +++ b/source4/lib/replace/README @@ -92,6 +92,7 @@ ZERO_STRUCTPN ZERO_ARRAY ARRAY_SIZE PTR_DIFF +offsetof Headers: stdint.h diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h index 06173bd84b9..e827719951f 100644 --- a/source4/lib/replace/replace.h +++ b/source4/lib/replace/replace.h @@ -52,6 +52,10 @@ #define QSORT_CAST (int (*)(const void *, const void *)) #endif +#ifndef offsetof +#define offsetof(t,f) ((unsigned int)&((t *)0)->f) +#endif + #ifdef HAVE_STDINT_H #include /* force off HAVE_INTTYPES_H so that roken doesn't try to include both, diff --git a/source4/lib/tdb/common/tdb_private.h b/source4/lib/tdb/common/tdb_private.h index 3871c29170e..99fa4434c0c 100644 --- a/source4/lib/tdb/common/tdb_private.h +++ b/source4/lib/tdb/common/tdb_private.h @@ -37,10 +37,6 @@ typedef uint32_t tdb_len_t; typedef uint32_t tdb_off_t; -#ifndef offsetof -#define offsetof(t,f) ((unsigned int)&((t *)0)->f) -#endif - #define TDB_MAGIC_FOOD "TDB file\n" #define TDB_VERSION (0x26011967 + 6) #define TDB_MAGIC (0x26011999U)