From abe3c8c33289e15e235aff120399ede316270a52 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sat, 2 Nov 2024 23:14:11 +0100 Subject: [PATCH] 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 --- include/bsd/sys/tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) \ -- 2.47.3