virarptable: Include rtnetlink.h only on Linux

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

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Chen Hanxiao<chenhanxiao@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Michal Privoznik 2018-03-15 13:27:55 +01:00
parent 944adb3106
commit 3ee5f8115d
2 changed files with 3 additions and 1 deletions

View File

@ -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"

View File

@ -25,7 +25,6 @@
# define __VIR_ARPTABLE_H__
# include "internal.h"
# include <linux/rtnetlink.h>
typedef struct _virArpTableEntry virArpTableEntry;
typedef virArpTableEntry *virArpTableEntryPtr;