lib: Fix FreeBSD build.
authorJoe Stringer <joestringer@nicira.com>
Wed, 25 Jun 2014 07:41:41 +0000 (07:41 +0000)
committerJoe Stringer <joestringer@nicira.com>
Thu, 26 Jun 2014 22:52:36 +0000 (10:52 +1200)
Various recent commits have introduced build failures on FreeBSD. This
patch fixes them.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/bfd.c
lib/netdev-bsd.c
lib/signals.h

index d83d198..4cbe999 100644 (file)
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -19,6 +19,7 @@
 #include <arpa/inet.h>
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
+#include <sys/socket.h>
 
 #include "byte-order.h"
 #include "connectivity.h"
index 3ece3cb..85f3b21 100644 (file)
@@ -996,7 +996,7 @@ netdev_bsd_get_stats(const struct netdev *netdev_, struct netdev_stats *stats)
                         netdev_get_name(netdev_), ovs_strerror(errno));
             return errno;
         } else if (!strcmp(ifmd.ifmd_name, netdev_get_name(netdev_))) {
-            convert_stats(netdev, stats, &ifdr.ifdr_data);
+            convert_stats(netdev_, stats, &ifmd.ifmd_data);
             break;
         }
     }
@@ -1786,6 +1786,7 @@ ifr_set_flags(struct ifreq *ifr, int flags)
 #endif
 }
 
+#if defined(__NetBSD__)
 /* Calls ioctl() on an AF_LINK sock, passing the specified 'command' and
  * 'arg'.  Returns 0 if successful, otherwise a positive errno value. */
 int
@@ -1807,3 +1808,4 @@ af_link_ioctl(unsigned long command, const void *arg)
             : ioctl(sock, command, arg) == -1 ? errno
             : 0);
 }
+#endif
index 3ef1b5b..7017ae8 100644 (file)
@@ -18,6 +18,7 @@
 #define SIGNALS_H 1
 
 #include <signal.h>
+#include <stddef.h>
 #include "type-props.h"
 
 enum { SIGNAL_NAME_BUFSIZE = 7 + INT_STRLEN(int) + 1 };