diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-08-11 07:42:11 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-08-11 07:42:11 +0000 |
commit | 33fc8292739296811fc53ae465e3245a2b598c3a (patch) | |
tree | 9fdafbf516c298add1f33277c694ad2729a02f31 /src/common | |
parent | f2945754692fe13330ec45922101c50bd8324cd9 (diff) | |
download | tor-33fc8292739296811fc53ae465e3245a2b598c3a.tar.gz tor-33fc8292739296811fc53ae465e3245a2b598c3a.zip |
r7337@Kushana: nickm | 2006-08-11 00:42:04 -0700
Only use __builtin_offsetof with gcc 4 or later
svn:r7028
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/util.h | 2 |
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) \ |