]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic: Move macro.h include in list.h to the top of the file
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 12 Apr 2025 14:50:36 +0000 (16:50 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 18 Apr 2025 12:19:16 +0000 (14:19 +0200)
Now that the circular dependency between log.h, macro.h and list.h
is gone, we can move the include to the top.

src/basic/list.h

index 10e69541d438fd449cb5cdf4177603de3c539d4c..090bdc7b6021894ef935afbd5bbbf0d252236e86 100644 (file)
@@ -1,6 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include "macro.h"
+
 /* The head of the linked list. Use this in the structure that shall
  * contain the head of the linked list */
 #define LIST_HEAD(t,name)                                               \
                         free_func(elem);                \
                 head;                                   \
         })
-
-/* Now include "macro.h", because we want our definition of assert() which the macros above use. We include
- * it down here instead of up top, since macro.h pulls in log.h which in turn needs our own definitions. */
-#include "macro.h"