aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsykose <alice@ayaya.dev>2023-04-22 12:17:54 +0000
committerpsykose <alice@ayaya.dev>2023-04-22 14:24:53 +0200
commit988f183cc9d6699930c3e18ccf4a9e36010afb56 (patch)
tree30fbcb453f034dfa9102304bb425d18882f8c69e
parente6f96eef010ab863fa4bd2787d16956414bae6f5 (diff)
main/libc-dev: fix tree.h use of unused
see https://github.com/void-linux/void-packages/issues/41769
-rw-r--r--main/libc-dev/APKBUILD4
-rw-r--r--main/libc-dev/sys-tree.h23
2 files changed, 21 insertions, 6 deletions
diff --git a/main/libc-dev/APKBUILD b/main/libc-dev/APKBUILD
index ada58879772..2fc347e6dd2 100644
--- a/main/libc-dev/APKBUILD
+++ b/main/libc-dev/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libc-dev
pkgver=0.7.2
-pkgrel=4
+pkgrel=5
pkgdesc="Meta package to pull in correct libc"
url="https://alpinelinux.org"
arch="noarch"
@@ -56,6 +56,6 @@ bsdcompat() {
sha512sums="
37c8fc73c7aea7b490f7850927e2bb91d12137c9e59e22c084146d515696dbc7973b5de92f4c987ba080dd2502ba83127006442c3f019b6447a620c0cae73178 sys-cdefs.h
2f0d5e6e4dc3350285cf17009265dddcbe12431c111868eea39bc8cb038ab7c1f2acacbb21735c4e9d4a1fd106a8fc0f8611ea33987d4faba37dde5ce6da0750 sys-queue.h
-07cb70f2f0ddb31e23dd913c6f561fc9885667c5803fdf3a559676c99d08834b4104589bacb5d17b4a0b379c68c81a1cf3173832b3da33a7b936fa7b93706844 sys-tree.h
+d9ac210d81feb8ad2655bc80fb065d3fe20ae4417b32b4a1711e6738a4870140005c13373b5d1846ef3ce5ae6da45f2dacef2092881eded0a2e94f6a07752ef3 sys-tree.h
7f8fc4b50aa88106adfba4971b2e441d6f480efef45ba8dce3b6c1235b1835a31883718e3d1f0606ad7366b965e52e00faf91c322e53f3af35da630126f26de4 sgidefs.h
"
diff --git a/main/libc-dev/sys-tree.h b/main/libc-dev/sys-tree.h
index eaea56aae39..e13d3c4da9b 100644
--- a/main/libc-dev/sys-tree.h
+++ b/main/libc-dev/sys-tree.h
@@ -1,5 +1,6 @@
/* $NetBSD: tree.h,v 1.20 2013/09/14 13:20:45 joerg Exp $ */
/* $OpenBSD: tree.h,v 1.13 2011/07/09 00:19:45 pirofti Exp $ */
+/* Modified by Void Linux. */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -28,6 +29,20 @@
#ifndef _SYS_TREE_H_
#define _SYS_TREE_H_
+#ifdef __GNUC__
+#define __GNUC_PREREQ__(x, y) \
+ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
+ (__GNUC__ > (x)))
+#else
+#define __GNUC_PREREQ__(x, y) 0
+#endif
+
+#if __GNUC_PREREQ__(2, 7) || defined(__lint__)
+#define _sys_tree_h_unused __attribute__((__unused__))
+#else
+#define _sys_tree_h_unused /* delete */
+#endif
+
/*
* This file defines data structures for different types of trees:
* splay trees and red-black trees.
@@ -130,7 +145,7 @@ name##_SPLAY_FIND(struct name *head, struct type *elm) \
return (NULL); \
} \
\
-static __inline __unused struct type * \
+static __inline _sys_tree_h_unused struct type * \
name##_SPLAY_NEXT(struct name *head, struct type *elm) \
{ \
name##_SPLAY(head, elm); \
@@ -144,7 +159,7 @@ name##_SPLAY_NEXT(struct name *head, struct type *elm) \
return (elm); \
} \
\
-static __unused __inline struct type * \
+static _sys_tree_h_unused __inline struct type * \
name##_SPLAY_MIN_MAX(struct name *head, int val) \
{ \
name##_SPLAY_MINMAX(head, val); \
@@ -377,7 +392,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, _sys_tree_h_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 *);\
@@ -396,7 +411,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, _sys_tree_h_unused static)
#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \
attr void \
name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \