Unified multiple definitions of container_of() macro.
Removed duplicate definitions of the container_of() macro and
refactored sources to use the single implementation.
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
diff --git a/shared/config-parser.c b/shared/config-parser.c
index 4174836..a50773b 100644
--- a/shared/config-parser.c
+++ b/shared/config-parser.c
@@ -39,10 +39,7 @@
#include <wayland-util.h>
#include "config-parser.h"
-
-#define container_of(ptr, type, member) ({ \
- const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
+#include "helpers.h"
struct weston_config_entry {
char *key;