From 0308ec564eeca4c51ef24019b53bc4396fc8a242 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 8 Jan 2013 16:41:36 +0100 Subject: util/list: don't use GLib --- src/util/list.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/util') diff --git a/src/util/list.h b/src/util/list.h index 28c70954..73d99bef 100644 --- a/src/util/list.h +++ b/src/util/list.h @@ -25,8 +25,6 @@ #ifndef _LINUX_LIST_H #define _LINUX_LIST_H -#include - #ifdef __clang__ /* allow typeof() */ #pragma GCC diagnostic ignored "-Wlanguage-extension-token" @@ -40,7 +38,7 @@ * */ #define container_of(ptr, type, member) \ - (&G_STRUCT_MEMBER(type, ptr, -G_STRUCT_OFFSET(type, member))) + ((type *)((uint8_t *)ptr - offsetof(type, member))) /* * These are non-NULL pointers that will result in page faults -- cgit v1.2.3