Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 1 | glibc 2.38 would include __isoc23_strtol and similar symbols. This is trggerd by |
| 2 | _GNU_SOURCE but we have to set that for other definitions. Therefore play with defines |
| 3 | to turn this off within pseudo_wrappers.c. Elsewhere we can switch to _DEFAULT_SOURCE |
| 4 | rather than _GNU_SOURCE. |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | Index: git/pseudo_wrappers.c |
| 9 | =================================================================== |
| 10 | --- git.orig/pseudo_wrappers.c |
| 11 | +++ git/pseudo_wrappers.c |
| 12 | @@ -6,6 +6,15 @@ |
| 13 | * SPDX-License-Identifier: LGPL-2.1-only |
| 14 | * |
| 15 | */ |
| 16 | +/* glibc 2.38 would include __isoc23_strtol and similar symbols. This is trggerd by |
| 17 | + * _GNU_SOURCE but we have to set that for other definitions. Therefore play with defines |
| 18 | + * to turn this off. |
| 19 | + */ |
| 20 | +#include <features.h> |
| 21 | +#undef __GLIBC_USE_ISOC2X |
| 22 | +#undef __GLIBC_USE_C2X_STRTOL |
| 23 | +#define __GLIBC_USE_C2X_STRTOL 0 |
| 24 | + |
| 25 | #include <assert.h> |
| 26 | #include <stdlib.h> |
| 27 | #include <limits.h> |
| 28 | Index: git/pseudo_util.c |
| 29 | =================================================================== |
| 30 | --- git.orig/pseudo_util.c |
| 31 | +++ git/pseudo_util.c |
| 32 | @@ -8,6 +8,14 @@ |
| 33 | */ |
| 34 | /* we need access to RTLD_NEXT for a horrible workaround */ |
| 35 | #define _GNU_SOURCE |
| 36 | +/* glibc 2.38 would include __isoc23_strtol and similar symbols. This is trggerd by |
| 37 | + * _GNU_SOURCE but we have to set that for other definitions. Therefore play with defines |
| 38 | + * to turn this off. |
| 39 | + */ |
| 40 | +#include <features.h> |
| 41 | +#undef __GLIBC_USE_ISOC2X |
| 42 | +#undef __GLIBC_USE_C2X_STRTOL |
| 43 | +#define __GLIBC_USE_C2X_STRTOL 0 |
| 44 | |
| 45 | #include <ctype.h> |
| 46 | #include <errno.h> |
| 47 | Index: git/pseudolog.c |
| 48 | =================================================================== |
| 49 | --- git.orig/pseudolog.c |
| 50 | +++ git/pseudolog.c |
| 51 | @@ -8,7 +8,7 @@ |
| 52 | */ |
| 53 | /* We need _XOPEN_SOURCE for strptime(), but if we define that, |
| 54 | * we then don't get S_IFSOCK... _GNU_SOURCE turns on everything. */ |
| 55 | -#define _GNU_SOURCE |
| 56 | +#define _DEFAULT_SOURCE |
| 57 | |
| 58 | #include <ctype.h> |
| 59 | #include <limits.h> |
| 60 | Index: git/pseudo_client.c |
| 61 | =================================================================== |
| 62 | --- git.orig/pseudo_client.c |
| 63 | +++ git/pseudo_client.c |
| 64 | @@ -6,7 +6,7 @@ |
| 65 | * SPDX-License-Identifier: LGPL-2.1-only |
| 66 | * |
| 67 | */ |
| 68 | -#define _GNU_SOURCE |
| 69 | +#define _DEFAULT_SOURCE |
| 70 | |
| 71 | #include <stdio.h> |
| 72 | #include <signal.h> |