diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2009-02-04 12:09:54 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2009-02-04 12:09:54 +0000 |
commit | 6101678b0c243b02cfcbbf9f109d89489069f317 (patch) | |
tree | ef95d9bda42c6c4391bc6a163a1cd4ed728bc2fa /native | |
parent | 9bbe6492c01d79fccc543d8e5177b8dc9c2bba66 (diff) | |
download | classpath-6101678b0c243b02cfcbbf9f109d89489069f317.tar.gz |
Fix build errors on gcc 4.3.3 with -Werror.
2009-02-03 Andrew John Hughes <ahughes@redhat.com>
* native/jni/native-lib/cpproc.c:
(cpproc_forkAndExec): Handle return of
chdir.
Diffstat (limited to 'native')
-rw-r--r-- | native/jni/native-lib/cpproc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/native/jni/native-lib/cpproc.c b/native/jni/native-lib/cpproc.c index bb34f6d6e..e3b69680f 100644 --- a/native/jni/native-lib/cpproc.c +++ b/native/jni/native-lib/cpproc.c @@ -86,7 +86,9 @@ int cpproc_forkAndExec (char * const *commandLine, char * const * newEnviron, close_all_fds(local_fds, pipe_count * 2); - chdir(wd); + i = chdir(wd); + if (i == -1) + return errno; if (newEnviron == NULL) execvp(commandLine[0], commandLine); else |