From: Guillem Jover Date: Sat, 2 Nov 2024 22:14:11 +0000 (+0100) Subject: include: Switch from __unused to new LIBBSD_UNUSED X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abe3c8c33289e15e235aff120399ede316270a52;p=thirdparty%2Flibbsd.git include: Switch from __unused to new LIBBSD_UNUSED Because we do not define __unused, as on GNU systems Linux and glibc providing conflicting symbols, declarations for imported functions that use that attribute cause build failures when used. Ref: https://bugs.debian.org/1083196 Fixes: #34 --- diff --git a/include/bsd/sys/tree.h b/include/bsd/sys/tree.h index 325b382..1a39b88 100644 --- a/include/bsd/sys/tree.h +++ b/include/bsd/sys/tree.h @@ -385,7 +385,7 @@ struct { \ #define RB_PROTOTYPE(name, type, field, cmp) \ RB_PROTOTYPE_INTERNAL(name, type, field, cmp,) #define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ - RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static) + RB_PROTOTYPE_INTERNAL(name, type, field, cmp, LIBBSD_UNUSED static) #define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\ @@ -404,7 +404,7 @@ attr struct type *name##_RB_MINMAX(struct name *, int); \ #define RB_GENERATE(name, type, field, cmp) \ RB_GENERATE_INTERNAL(name, type, field, cmp,) #define RB_GENERATE_STATIC(name, type, field, cmp) \ - RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static) + RB_GENERATE_INTERNAL(name, type, field, cmp, LIBBSD_UNUSED static) #define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ attr void \ name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \