]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
include: Switch from __unused to new LIBBSD_UNUSED
authorGuillem Jover <guillem@hadrons.org>
Sat, 2 Nov 2024 22:14:11 +0000 (23:14 +0100)
committerGuillem Jover <guillem@hadrons.org>
Sat, 26 Jul 2025 10:26:01 +0000 (12:26 +0200)
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

index 325b382b1e922bfbad4e67127bba31efe256bb16..1a39b88ca00bd2a833603f429f0aaa9cebcb1c78 100644 (file)
@@ -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)            \