summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/util.h b/src/common/util.h
index 55c9a7c28c..7db4f28647 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -97,7 +97,7 @@ extern int dmalloc_free(const char *file, const int line, void *pnt,
#define tor_memdup(s, n) _tor_memdup(s, n DMALLOC_ARGS)
/** Return the offset of <b>member</b> within the type <b>tp</b>, in bytes */
-#ifdef __GNUC__
+#if defined(__GNUC__) && __GNUC__ > 3
#define STRUCT_OFFSET(tp, member) __builtin_offsetof(tp, member)
#else
#define STRUCT_OFFSET(tp, member) \