From 11b10bc2b071584b58b64171325945eeb6fc3cde Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Wed, 17 Nov 2021 18:21:30 +0100 Subject: [PATCH] farp: Fix incompatible function types warning --- src/libcharon/plugins/farp/farp_spoofer.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/libcharon/plugins/farp/farp_spoofer.c b/src/libcharon/plugins/farp/farp_spoofer.c index 2a1b511c31..2476b018dd 100644 --- a/src/libcharon/plugins/farp/farp_spoofer.c +++ b/src/libcharon/plugins/farp/farp_spoofer.c @@ -139,10 +139,8 @@ static void send_arp(private_farp_spoofer_t *this, } } -/** - * ARP request receiving - */ -static bool receive_arp(private_farp_spoofer_t *this) +CALLBACK(receive_arp, bool, + private_farp_spoofer_t *this, int fd, watcher_event_t event) { struct sockaddr_ll addr; socklen_t addr_len = sizeof(addr); @@ -227,8 +225,7 @@ farp_spoofer_t *farp_spoofer_create(farp_listener_t *listener) return NULL; } - lib->watcher->add(lib->watcher, this->skt, WATCHER_READ, - (watcher_cb_t)receive_arp, this); + lib->watcher->add(lib->watcher, this->skt, WATCHER_READ, receive_arp, this); return &this->public; } -- 2.47.2