From 10e9efaa5d6ad10e3bb9e0a61ef818ce9174ca50 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 24 Aug 2024 01:35:14 -0400 Subject: [PATCH] freebsd_iflib: Fixes to avoid implicit-function-declaration errors. No functional change intended. --- src/libs/compat/freebsd_iflib/iflib.c | 4 ++++ src/libs/compat/freebsd_iflib/nvlist.c | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/libs/compat/freebsd_iflib/iflib.c b/src/libs/compat/freebsd_iflib/iflib.c index fcf142b047..3f19916b4b 100644 --- a/src/libs/compat/freebsd_iflib/iflib.c +++ b/src/libs/compat/freebsd_iflib/iflib.c @@ -4529,7 +4529,11 @@ iflib_if_qflush(if_t ifp) * When ALTQ is enabled, this will also take care of purging the * ALTQ queue(s). */ +#ifdef __HAIKU__ + ifp->if_qflush(ifp); +#else if_qflush(ifp); +#endif } #define IFCAP_FLAGS (IFCAP_HWCSUM_IPV6 | IFCAP_HWCSUM | IFCAP_LRO | \ diff --git a/src/libs/compat/freebsd_iflib/nvlist.c b/src/libs/compat/freebsd_iflib/nvlist.c index 31ab62abeb..586535f9f3 100644 --- a/src/libs/compat/freebsd_iflib/nvlist.c +++ b/src/libs/compat/freebsd_iflib/nvlist.c @@ -1463,16 +1463,6 @@ nvlist_add_nvpair(nvlist_t *nvl, const nvpair_t *nvp) nvlist_update_size(nvl, newnvp, 1); } -void -nvlist_add_stringf(nvlist_t *nvl, const char *name, const char *valuefmt, ...) -{ - va_list valueap; - - va_start(valueap, valuefmt); - nvlist_add_stringv(nvl, name, valuefmt, valueap); - va_end(valueap); -} - void nvlist_add_stringv(nvlist_t *nvl, const char *name, const char *valuefmt, va_list valueap) @@ -1493,6 +1483,16 @@ nvlist_add_stringv(nvlist_t *nvl, const char *name, const char *valuefmt, } } +void +nvlist_add_stringf(nvlist_t *nvl, const char *name, const char *valuefmt, ...) +{ + va_list valueap; + + va_start(valueap, valuefmt); + nvlist_add_stringv(nvl, name, valuefmt, valueap); + va_end(valueap); +} + void nvlist_add_null(nvlist_t *nvl, const char *name) {