fix compilation with GCC 4.6 on Linux
authorSteven Barth <steven@midlink.org>
Thu, 22 Sep 2011 20:10:44 +0000 (20:10 +0000)
committerSteven Barth <steven@midlink.org>
Thu, 22 Sep 2011 20:10:44 +0000 (20:10 +0000)
device.c
main.c

index 7307414d737b4b9a2467d9dc966657847b60cfba..8bc8b53218c94f16156c606cbd15f5693af5b9aa 100644 (file)
--- a/device.c
+++ b/device.c
@@ -6,6 +6,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <net/ethernet.h>
+#include <netinet/ether.h>
 
 #include "netifd.h"
 #include "system.h"
diff --git a/main.c b/main.c
index 7d7bfcb478caf7a7abc21578bb8facaba7bfab3b..7602f23b0aaa89ff96d0b736726c3c63ff9d7dd6 100644 (file)
--- a/main.c
+++ b/main.c
@@ -2,6 +2,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <getopt.h>
+#include <unistd.h>
 
 #include "netifd.h"
 #include "ubus.h"
@@ -57,7 +58,7 @@ int main(int argc, char **argv)
                }
        }
 
-       if (netifd_ubus_init(NULL) < 0) {
+       if (netifd_ubus_init(socket) < 0) {
                fprintf(stderr, "Failed to connect to ubus\n");
                return 1;
        }