diff options
author | Ben Pfaff <blp@nicira.com> | 2010-05-26 10:38:52 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-05-26 15:36:58 -0700 |
commit | c83cdd307248d798eac0d85681b0abeaaff1bf61 (patch) | |
tree | 0b5479c841de10789b2e47b922789b1ff3b18bbe | |
parent | b90fa799b93b5cc10f57e714909fb35ad472772e (diff) | |
download | openvswitch-c83cdd307248d798eac0d85681b0abeaaff1bf61.tar.gz |
lib: Disable Linux-specific libraries on non-Linux systems.
-rw-r--r-- | lib/automake.mk | 18 | ||||
-rw-r--r-- | lib/dpif.c | 2 | ||||
-rw-r--r-- | lib/netdev.c | 2 |
3 files changed, 13 insertions, 9 deletions
diff --git a/lib/automake.mk b/lib/automake.mk index 53a900696..5cc4e0fe4 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -34,7 +34,6 @@ lib_libopenvswitch_a_SOURCES = \ lib/dhcp.h \ lib/dhparams.h \ lib/dirs.h \ - lib/dpif-linux.c \ lib/dpif-netdev.c \ lib/dpif-provider.h \ lib/dpif.c \ @@ -63,12 +62,7 @@ lib_libopenvswitch_a_SOURCES = \ lib/lockfile.h \ lib/mac-learning.c \ lib/mac-learning.h \ - lib/netdev-gre.c \ - lib/netdev-linux.c \ - lib/netdev-patch.c \ lib/netdev-provider.h \ - lib/netdev-vport.c \ - lib/netdev-vport.h \ lib/netdev.c \ lib/netdev.h \ lib/odp-util.c \ @@ -106,8 +100,6 @@ lib_libopenvswitch_a_SOURCES = \ lib/rconn.h \ lib/reconnect.c \ lib/reconnect.h \ - lib/rtnetlink.c \ - lib/rtnetlink.h \ lib/sat-math.h \ lib/sha1.c \ lib/sha1.h \ @@ -175,9 +167,17 @@ endif if HAVE_NETLINK lib_libopenvswitch_a_SOURCES += \ + lib/dpif-linux.c \ + lib/netdev-gre.c \ + lib/netdev-linux.c \ + lib/netdev-patch.c \ + lib/netdev-vport.c \ + lib/netdev-vport.h \ lib/netlink-protocol.h \ lib/netlink.c \ - lib/netlink.h + lib/netlink.h \ + lib/rtnetlink.c \ + lib/rtnetlink.h endif if HAVE_OPENSSL diff --git a/lib/dpif.c b/lib/dpif.c index 097b38d8c..8286da402 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -42,7 +42,9 @@ #define THIS_MODULE VLM_dpif static const struct dpif_class *base_dpif_classes[] = { +#ifdef HAVE_NETLINK &dpif_linux_class, +#endif &dpif_netdev_class, }; diff --git a/lib/netdev.c b/lib/netdev.c index c21afef82..0b0463b90 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -42,10 +42,12 @@ #include "vlog.h" static const struct netdev_class *base_netdev_classes[] = { +#ifdef HAVE_NETLINK &netdev_linux_class, &netdev_tap_class, &netdev_patch_class, &netdev_gre_class, +#endif }; static struct shash netdev_classes = SHASH_INITIALIZER(&netdev_classes); |