aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-08 16:41:36 +0100
committerMax Kellermann <max@duempel.org>2013-01-08 16:41:36 +0100
commit0308ec564eeca4c51ef24019b53bc4396fc8a242 (patch)
treeaee33457374f8a38f4cf92f2ab8094764e0efa14 /src
parent6cafec8ae6181aae095bf546e576c6b5f40cd41c (diff)
util/list: don't use GLib
Diffstat (limited to 'src')
-rw-r--r--src/song.h2
-rw-r--r--src/util/list.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/song.h b/src/song.h
index 119d89cc..6ac03695 100644
--- a/src/song.h
+++ b/src/song.h
@@ -23,6 +23,8 @@
#include "util/list.h"
#include "gcc.h"
+#include <glib.h>
+
#include <assert.h>
#include <stddef.h>
#include <stdbool.h>
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 <glib.h>
-
#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