]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virnetdevbridge: Include virnetlink.h more often
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 12 May 2025 12:29:21 +0000 (14:29 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 14 May 2025 10:32:08 +0000 (12:32 +0200)
The whole point of virnetlink.h is that it hides away the build
time dependency on netlink. It wraps netlink functions in our
functions which then have a stub implementation in case netlink
support was disabled.

Though, netlink is still Linux specific, so keep it in the
'#ifdef __linux__` block to cause a compilation error should
anybody try to use any of the wrapped functions on non-Linux.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/util/virnetdevbridge.c

index 3b54e2cb1e0002184d86d34e0cea13f6a52cea7d..806ccc5fa77f1e0865c96774aa2f07f4dcefa81c 100644 (file)
@@ -30,9 +30,7 @@
 #endif
 
 #ifdef __linux__
-# if defined(WITH_LIBNL)
-#  include "virnetlink.h"
-# endif
+# include "virnetlink.h"
 # include <linux/sockios.h>
 # include <linux/param.h>     /* HZ                 */
 # include <linux/in6.h>