lib: Disable Linux-specific libraries on non-Linux systems.
authorBen Pfaff <blp@nicira.com>
Wed, 26 May 2010 17:38:52 +0000 (10:38 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 26 May 2010 22:36:58 +0000 (15:36 -0700)
lib/automake.mk
lib/dpif.c
lib/netdev.c

index 53a9006..5cc4e0f 100644 (file)
@@ -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
index 097b38d..8286da4 100644 (file)
@@ -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,
 };
 
index c21afef..0b0463b 100644 (file)
 #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);