blob: a9a6799a4d976ddc9cf4d587397a08a942460d8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
From 525014c4bdce23f0502a7464db46bffa46c7f50d Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Wed, 11 Jun 2025 23:47:58 +0200
Subject: [PATCH] Define macro ATTRIBUTE_UNUSED that libxml2 2.14.0 no longer
exposes
https://bugs.gentoo.org/955674
---
src/xml_pyx.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/xml_pyx.c b/src/xml_pyx.c
index ab295f1..bc28c1d 100644
--- a/src/xml_pyx.c
+++ b/src/xml_pyx.c
@@ -21,6 +21,18 @@
#include "xmlstar.h"
+/**
+ * libxml2 2.14.0 no longer defines macro ATTRIBUTE_UNUSED for us
+ * https://github.com/GNOME/libxml2/commit/208f27f9641a59863ce1f7d4992df77f7eb0ea9d
+ */
+#if ! defined(ATTRIBUTE_UNUSED)
+# if __GNUC__ * 100 + __GNUC_MINOR__ >= 207
+# define ATTRIBUTE_UNUSED __attribute__((unused))
+# else
+# define ATTRIBUTE_UNUSED
+# endif
+#endif
+
/**
* Output newline and tab characters as escapes
* Required both for attribute values and character data (#PCDATA)
--
2.49.0
|