diff options
Diffstat (limited to 'sysdeps/i386/init-first.c')
-rw-r--r-- | sysdeps/i386/init-first.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/i386/init-first.c b/sysdeps/i386/init-first.c index 0fa08e9d17..4b83e19285 100644 --- a/sysdeps/i386/init-first.c +++ b/sysdeps/i386/init-first.c @@ -20,6 +20,7 @@ #include <unistd.h> extern void __libc_init (int, char **, char **); +extern void __getopt_clean_environment (void); extern void __libc_global_ctors (void); int __libc_multiple_libcs = 1; @@ -33,6 +34,9 @@ init (int *data) __environ = envp; __libc_init (argc, argv, envp); + + /* This is a hack to make the special getopt in GNU libc working. */ + __getopt_clean_environment (); } #ifdef PIC |