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

[libvirt] [PATCH 4/7] Ensure GET_VLAN_VID_CMD is always defined



From: "Daniel P. Berrange" <berrange redhat com>

The RHEL4 vintage header files do not define GET_VLAN_VID_CMD.
Conditionally define it in our source, since the kernel can
raise a runtime error if it isn't supported

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
 src/util/virnetdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index 296871c..4cdbb0c 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -673,6 +673,9 @@ int virNetDevGetIndex(const char *ifname ATTRIBUTE_UNUSED,
 
 
 #if defined(SIOCGIFVLAN) && defined(HAVE_STRUCT_IFREQ)
+# ifndef GET_VLAN_VID_CMD
+#  define GET_VLAN_VID_CMD 9
+# endif
 int virNetDevGetVLanID(const char *ifname, int *vlanid)
 {
     struct vlan_ioctl_args vlanargs = {
-- 
1.8.1.4


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