diff --git a/elf/dl-support.c b/elf/dl-support.c
index 614b5b3e0c..b5ec5bd6d1 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -250,12 +250,27 @@ _dl_aux_init (ElfW(auxv_t) *av)
#endif
_dl_auxv = av;
- dl_parse_auxv_t auxv_values;
- /* Use an explicit initialization loop here because memset may not
- be available yet. */
- for (int i = 0; i < array_length (auxv_values); ++i)
- auxv_values[i] = 0;
+ dl_parse_auxv_t auxv_values = { 0, };
diff --git a/sysdeps/unix/sysv/linux/dl-parse_auxv.h b/sysdeps/unix/sysv/linux/dl-parse_auxv.h
index bf9374371e..2bf3a0ca6b 100644
--- a/sysdeps/unix/sysv/linux/dl-parse_auxv.h
+++ b/sysdeps/unix/sysv/linux/dl-parse_auxv.h
@@ -21,6 +21,7 @@
#include <fpu_control.h>
#include <ldsodefs.h>
#include <link.h>
+#include <dl-auxv.h> /* For DL_PLATFORM_AUXV */
typedef ElfW(Addr) dl_parse_auxv_t[AT_MINSIGSTKSZ + 1];
* Adhemerval Zanella:
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 614b5b3e0c..b5ec5bd6d1 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -250,12 +250,27 @@ _dl_aux_init (ElfW(auxv_t) *av)
#endif
_dl_auxv = av;
- dl_parse_auxv_t auxv_values;
- /* Use an explicit initialization loop here because memset may not
- be available yet. */
- for (int i = 0; i < array_length (auxv_values); ++i)
- auxv_values[i] = 0;
+ dl_parse_auxv_t auxv_values = { 0, };
Is this really safe? If so, it should still be in a separate commit.
diff --git a/sysdeps/unix/sysv/linux/dl-parse_auxv.h b/sysdeps/unix/sysv/linux/dl-parse_auxv.h
index bf9374371e..2bf3a0ca6b 100644
--- a/sysdeps/unix/sysv/linux/dl-parse_auxv.h
+++ b/sysdeps/unix/sysv/linux/dl-parse_auxv.h
@@ -21,6 +21,7 @@
#include <fpu_control.h>
#include <ldsodefs.h>
#include <link.h>
+#include <dl-auxv.h> /* For DL_PLATFORM_AUXV */
typedef ElfW(Addr) dl_parse_auxv_t[AT_MINSIGSTKSZ + 1];
Why is this change needed?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 354 |
Nodes: | 16 (2 / 14) |
Uptime: | 40:44:37 |
Calls: | 7,650 |
Calls today: | 2 |
Files: | 12,811 |
Messages: | 5,699,700 |