carl9170 firmware tools: fix compile errors in wol.c
authorChristian Lamparter <chunkeey@googlemail.com>
Fri, 21 Aug 2015 11:44:36 +0000 (13:44 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Fri, 21 Aug 2015 11:44:36 +0000 (13:44 +0200)
wol.c: In function ‘monitor_init’:
wol.c:40:19: warning: implicit declaration of function ‘if_nametoindex’
  ll.sll_ifindex = if_nametoindex(ifname);
                   ^
wol.c:46:45: warning: implicit declaration of function ‘htons’
  monitor_sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
                                             ^

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
tools/src/wol.c

index 41daba2a7b66e75e4271e2602be79c04e157400e..f2bd51b2208f20e4eb488c27fc65eba6d1557236 100644 (file)
 #include <sys/types.h>
 #include <sys/socket.h>
 
+#include <arpa/inet.h>
+#include <net/if.h>
+
 #include <linux/types.h>
 #include <linux/if_ether.h>    /* ETH_P_ALL */
 #include <linux/if_packet.h>   /* sockaddr_ll */
-#include <linux/if.h>          /* IFNAMSIZ */
 
 static int monitor_init(const char *ifname)
 {