aboutsummaryrefslogtreecommitdiff
path: root/sim/common/nrun.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-15 08:43:36 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-15 10:59:19 -0400
commitc5a2e0123b7241be6a2022f1acb8fa700dda628a (patch)
tree8418125810838d9bdb2970385d9672a907efc59c /sim/common/nrun.c
parentb9c0d703127de14cdbb32dc3607fd16cc427e352 (diff)
downloadbinutils-c5a2e0123b7241be6a2022f1acb8fa700dda628a.zip
binutils-c5a2e0123b7241be6a2022f1acb8fa700dda628a.tar.gz
binutils-c5a2e0123b7241be6a2022f1acb8fa700dda628a.tar.bz2
sim: switch to libiberty environ.h
Drop our compat code and assume environ exists to simplify.
Diffstat (limited to 'sim/common/nrun.c')
-rw-r--r--sim/common/nrun.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index 1ceb083..8a1b3c1 100644
--- a/sim/common/nrun.c
+++ b/sim/common/nrun.c
@@ -27,16 +27,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sim-main.h"
#include "bfd.h"
+#include "environ.h"
#ifndef HAVE_STRSIGNAL
/* While libiberty provides a fallback, it doesn't provide a prototype. */
extern const char *strsignal (int);
#endif
-#ifdef HAVE_ENVIRON
-extern char **environ;
-#endif
-
#ifdef HAVE_UNISTD_H
/* For chdir. */
#include <unistd.h>
@@ -133,11 +130,7 @@ main (int argc, char **argv)
exit (1);
/* Prepare the program for execution. */
-#ifdef HAVE_ENVIRON
sim_create_inferior (sd, prog_bfd, prog_argv, environ);
-#else
- sim_create_inferior (sd, prog_bfd, prog_argv, NULL);
-#endif
/* To accommodate relative file paths, chdir to sysroot now. We
mustn't do this until BFD has opened the program, else we wouldn't