summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pseudo/files/glibc238.patch
blob: 76ca8c11eb680963a5eefdc08ce1b10d7731d9bf (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
glibc 2.38 would include  __isoc23_strtol and similar symbols. This is trggerd by
_GNU_SOURCE but we have to set that for other definitions. Therefore play with defines
to turn this off within pseudo_wrappers.c. Elsewhere we can switch to _DEFAULT_SOURCE
rather than _GNU_SOURCE.

Upstream-Status: Pending

Index: git/pseudo_wrappers.c
===================================================================
--- git.orig/pseudo_wrappers.c
+++ git/pseudo_wrappers.c
@@ -6,6 +6,15 @@
  * SPDX-License-Identifier: LGPL-2.1-only
  *
  */
+/* glibc 2.38 would include  __isoc23_strtol and similar symbols. This is trggerd by
+ * _GNU_SOURCE but we have to set that for other definitions. Therefore play with defines
+ * to turn this off.
+ */
+#include <features.h>
+#undef __GLIBC_USE_ISOC2X
+#undef __GLIBC_USE_C2X_STRTOL
+#define __GLIBC_USE_C2X_STRTOL 0
+
 #include <assert.h>
 #include <stdlib.h>
 #include <limits.h>
Index: git/pseudo_util.c
===================================================================
--- git.orig/pseudo_util.c
+++ git/pseudo_util.c
@@ -8,6 +8,14 @@
  */
 /* we need access to RTLD_NEXT for a horrible workaround */
 #define _GNU_SOURCE
+/* glibc 2.38 would include  __isoc23_strtol and similar symbols. This is trggerd by
+ * _GNU_SOURCE but we have to set that for other definitions. Therefore play with defines
+ * to turn this off.
+ */
+#include <features.h>
+#undef __GLIBC_USE_ISOC2X
+#undef __GLIBC_USE_C2X_STRTOL
+#define __GLIBC_USE_C2X_STRTOL 0
 
 #include <ctype.h>
 #include <errno.h>
Index: git/pseudolog.c
===================================================================
--- git.orig/pseudolog.c
+++ git/pseudolog.c
@@ -8,7 +8,7 @@
  */
 /* We need _XOPEN_SOURCE for strptime(), but if we define that,
  * we then don't get S_IFSOCK... _GNU_SOURCE turns on everything. */
-#define _GNU_SOURCE
+#define _DEFAULT_SOURCE
 
 #include <ctype.h>
 #include <limits.h>
Index: git/pseudo_client.c
===================================================================
--- git.orig/pseudo_client.c
+++ git/pseudo_client.c
@@ -6,7 +6,7 @@
  * SPDX-License-Identifier: LGPL-2.1-only
  *
  */
-#define _GNU_SOURCE
+#define _DEFAULT_SOURCE
 
 #include <stdio.h>
 #include <signal.h>