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>
#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)
{