diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-05-29 15:23:24 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-29 15:32:59 -0400 |
commit | 1f8ef36f752871485e6e462dc1cfaa8ac5058011 (patch) | |
tree | 2a22b5c00df05aff551ef85f24ad4bc852a31ebb /sim/v850 | |
parent | fc23e71a17c38150bfad9e520f81f839fc2df4d8 (diff) | |
download | gdb-1f8ef36f752871485e6e462dc1cfaa8ac5058011.zip gdb-1f8ef36f752871485e6e462dc1cfaa8ac5058011.tar.gz gdb-1f8ef36f752871485e6e462dc1cfaa8ac5058011.tar.bz2 |
sim: v850: add pointer casts for execv on Windows
The execv prototypes on Windows via mingw64 include extra const
markings on the argv/envp pointers than what POSIX specifies.
Cast them to void* as a hack to get it working on all platforms.
Diffstat (limited to 'sim/v850')
-rw-r--r-- | sim/v850/ChangeLog | 4 | ||||
-rw-r--r-- | sim/v850/simops.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 02e6bbd..29237d8 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,7 @@ +2021-05-29 Mike Frysinger <vapier@gentoo.org> + + * simops.c (OP_10007E0): Add (void*) casts to argv & envp. + 2021-05-17 Mike Frysinger <vapier@gentoo.org> * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete. diff --git a/sim/v850/simops.c b/sim/v850/simops.c index 62a2bbc..f0e2745 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -1640,7 +1640,7 @@ OP_10007E0 (void) char *path = fetch_str (simulator, PARM1); char **argv = fetch_argv (simulator, PARM2); char **envp = fetch_argv (simulator, PARM3); - RETVAL = execve (path, argv, envp); + RETVAL = execve (path, (void *)argv, (void *)envp); free (path); freeargv (argv); freeargv (envp); @@ -1656,7 +1656,7 @@ OP_10007E0 (void) { char *path = fetch_str (simulator, PARM1); char **argv = fetch_argv (simulator, PARM2); - RETVAL = execv (path, argv); + RETVAL = execv (path, (void *)argv); free (path); freeargv (argv); RETERR = errno; |