From: Nick Mathewson Date: Fri, 11 Aug 2006 07:42:11 +0000 (+0000) Subject: r7337@Kushana: nickm | 2006-08-11 00:42:04 -0700 X-Git-Tag: tor-0.1.2.1-alpha~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33fc8292739296811fc53ae465e3245a2b598c3a;p=thirdparty%2Ftor.git r7337@Kushana: nickm | 2006-08-11 00:42:04 -0700 Only use __builtin_offsetof with gcc 4 or later svn:r7028 --- 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 member within the type tp, in bytes */ -#ifdef __GNUC__ +#if defined(__GNUC__) && __GNUC__ > 3 #define STRUCT_OFFSET(tp, member) __builtin_offsetof(tp, member) #else #define STRUCT_OFFSET(tp, member) \