From: Tobias Brunner Date: Fri, 15 Jul 2022 11:50:43 +0000 (+0200) Subject: forecast: Fix incompatible function types warning X-Git-Tag: 5.9.7rc1~11 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=36d16e5b245a09bcb1799a5e85c06458d07bea33;p=thirdparty%2Fstrongswan.git forecast: Fix incompatible function types warning --- diff --git a/src/libcharon/plugins/forecast/forecast_forwarder.c b/src/libcharon/plugins/forecast/forecast_forwarder.c index f24019e0a3..0fd199b36d 100644 --- a/src/libcharon/plugins/forecast/forecast_forwarder.c +++ b/src/libcharon/plugins/forecast/forecast_forwarder.c @@ -155,7 +155,8 @@ static bool is_bootp(void *buf, size_t len) /** * Broadcast/Multicast receiver */ -static bool receive_casts(private_forecast_forwarder_t *this) +CALLBACK(receive_casts, bool, + private_forecast_forwarder_t *this, int fd, watcher_event_t event) { struct __attribute__((packed)) { struct iphdr hdr; @@ -171,7 +172,7 @@ static bool receive_casts(private_forecast_forwarder_t *this) socklen_t alen = sizeof(addr); bool reinject; - len = recvfrom(this->kernel.pkt, &buf, sizeof(buf), MSG_DONTWAIT, + len = recvfrom(fd, &buf, sizeof(buf), MSG_DONTWAIT, (struct sockaddr*)&addr, &alen); if (len < 0) { @@ -496,7 +497,7 @@ forecast_forwarder_t *forecast_forwarder_create(forecast_listener_t *listener) &this->kernel.listener); lib->watcher->add(lib->watcher, this->kernel.pkt, WATCHER_READ, - (watcher_cb_t)receive_casts, this); + receive_casts, this); return &this->public; }