From b5872bccede521e00e5ef9aee1a280895ed9e6be Mon Sep 17 00:00:00 2001 From: no92 Date: Sun, 16 Jun 2024 13:02:51 +0200 Subject: fix header ordering The kernel headers are supposed to be included after net/if.h, as they check whether net/if.h has been included before them, and if so, avoid redefinitions. This also avoid the non-portable hack of `#undef __USE_MISC`, which probably silently breaks glibc and leads to namespace pollution. Signed-off-by: Christian Hesse --- netlink-notify.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/netlink-notify.h b/netlink-notify.h index a58f2f7..cf67621 100644 --- a/netlink-notify.h +++ b/netlink-notify.h @@ -31,18 +31,16 @@ #include #include -#include -#include -#include -#include -/* we have to undefine this before including net/if.h to - * notget redefined structs, etc. */ -#undef __USE_MISC #include #include #include #include +#include +#include +#include +#include + /* systemd headers */ #ifdef HAVE_SYSTEMD #include -- cgit v1.2.3-70-g09d2