Useful macro
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 30 Oct 2014 00:18:58 +0000 (20:18 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 30 Oct 2014 02:35:37 +0000 (22:35 -0400)
src/include/build.h

index 1934023..a006d01 100644 (file)
@@ -37,6 +37,11 @@ extern "C" {
 #endif
 
 /*
+ *     struct field size
+ */
+#define SIZEOF_MEMBER(_t, _m) sizeof(((_t *)0)->_m)
+
+/*
  *     Only use GCC __attribute__ if were building with a GCClike
  *     compiler.
  */