From c83cdd307248d798eac0d85681b0abeaaff1bf61 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 26 May 2010 10:38:52 -0700 Subject: [PATCH] lib: Disable Linux-specific libraries on non-Linux systems. --- lib/automake.mk | 18 +++++++++--------- lib/dpif.c | 2 ++ 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); -- 2.43.0