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 53a900696175845c8b4d9b2e619c66f7dbbce165..5cc4e0fe46116398294d1411eb44e6fc614bab3b 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 097b38d8c22aa7eeaf359d4912bb2d20995cceb9..8286da402ae808c48019dcef9c019e7f7338ebef 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 c21afef829ca22d1bca8e475813df654dc5f9955..0b0463b9070d2fb83e403faa7d00f52c8f998065 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);