Commit 0308ec56 authored by Max Kellermann's avatar Max Kellermann

util/list: don't use GLib

parent 6cafec8a
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include "util/list.h" #include "util/list.h"
#include "gcc.h" #include "gcc.h"
#include <glib.h>
#include <assert.h> #include <assert.h>
#include <stddef.h> #include <stddef.h>
#include <stdbool.h> #include <stdbool.h>
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
#ifndef _LINUX_LIST_H #ifndef _LINUX_LIST_H
#define _LINUX_LIST_H #define _LINUX_LIST_H
#include <glib.h>
#ifdef __clang__ #ifdef __clang__
/* allow typeof() */ /* allow typeof() */
#pragma GCC diagnostic ignored "-Wlanguage-extension-token" #pragma GCC diagnostic ignored "-Wlanguage-extension-token"
...@@ -40,7 +38,7 @@ ...@@ -40,7 +38,7 @@
* *
*/ */
#define container_of(ptr, type, member) \ #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 * These are non-NULL pointers that will result in page faults
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment