initial commit
[glibc.git] / debian / patches / hurd-i386 / unsubmitted-getaux_at_secure.diff
1 FIXME: sysdeps/mach/hurd/i386/init-first.c should instead pass an auxv
2 to __libc_start_main
3
4 Index: glibc-2.33/misc/getauxval.c
5 ===================================================================
6 --- glibc-2.33.orig/misc/getauxval.c
7 +++ glibc-2.33/misc/getauxval.c
8 @@ -19,6 +19,7 @@
9 #include <errno.h>
10 #include <ldsodefs.h>
11 #include <stdbool.h>
12 +#include <unistd.h>
13
14 bool
15 __getauxval2 (unsigned long int type, unsigned long int *result)
16 @@ -27,6 +28,14 @@ __getauxval2 (unsigned long int type, un
17 ElfW(auxv_t) *p;
18 #endif
19
20 +#ifdef AT_SECURE
21 + if (type == AT_SECURE)
22 + {
23 + *result = __libc_enable_secure;
24 + return true;
25 + }
26 +#endif
27 +
28 #ifdef AT_HWCAP
29 if (type == AT_HWCAP)
30 {