[PATCH 2/2] virarptable: Include rtnetlink.h only on Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



And at the same time, do that from .c rather than .h file.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/util/virarptable.c | 3 +++
 src/util/virarptable.h | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/util/virarptable.c b/src/util/virarptable.c
index 2730ef91af..8d9ab5fdc8 100644
--- a/src/util/virarptable.c
+++ b/src/util/virarptable.c
@@ -26,6 +26,9 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <arpa/inet.h>
+#ifdef __linux__
+# include <linux/rtnetlink.h>
+#endif
 
 #include "viralloc.h"
 #include "virarptable.h"
diff --git a/src/util/virarptable.h b/src/util/virarptable.h
index 404d8eb867..6829198128 100644
--- a/src/util/virarptable.h
+++ b/src/util/virarptable.h
@@ -25,7 +25,6 @@
 # define __VIR_ARPTABLE_H__
 
 # include "internal.h"
-# include <linux/rtnetlink.h>
 
 typedef struct _virArpTableEntry virArpTableEntry;
 typedef virArpTableEntry *virArpTableEntryPtr;
-- 
2.16.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux