X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fvlandev.c;h=d2f5a37e10d25ff7c159e675e39a1b8c91762868;hb=003ce655b7116d18c86a74c50391e54990346931;hp=b793f774816d0db18b3b6e9fb7ec3d9a71ac3f78;hpb=c2c28dfd68eeb4744edb1375eae6ccc74201e812;p=sliver-openvswitch.git diff --git a/lib/vlandev.c b/lib/vlandev.c index b793f7748..d2f5a37e1 100644 --- a/lib/vlandev.c +++ b/lib/vlandev.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013 Nicira, Inc. + * Copyright (c) 2011, 2013, 2014 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ struct vlandev_class { int (*vd_del)(const char *vlan_dev); }; -#ifdef LINUX_DATAPATH +#ifdef __linux__ static const struct vlandev_class vlandev_linux_class; #endif static const struct vlandev_class vlandev_stub_class; @@ -61,7 +61,7 @@ static const struct vlandev_class * vlandev_get_class(void) { if (!vd_class) { -#ifdef LINUX_DATAPATH +#if __linux__ vd_class = &vlandev_linux_class; #else vd_class = &vlandev_stub_class; @@ -161,7 +161,7 @@ vlandev_get_name(const char *real_dev_name, int vid) /* The Linux vlandev implementation. */ -#ifdef LINUX_DATAPATH +#ifdef __linux__ #include "rtnetlink-link.h" #include #include @@ -374,7 +374,7 @@ static int vlandev_del__(const char *vlan_dev) { struct shash_node *vd_node = shash_find(&vlan_devs, vlan_dev); - if (!vd_node) { + if (vd_node) { struct vlan_dev *vd = vd_node->data; struct vlan_real_dev *vrd = vd->real_dev;