summaryrefslogtreecommitdiff
path: root/native
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2009-02-04 12:09:54 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2009-02-04 12:09:54 +0000
commit6101678b0c243b02cfcbbf9f109d89489069f317 (patch)
treeef95d9bda42c6c4391bc6a163a1cd4ed728bc2fa /native
parent9bbe6492c01d79fccc543d8e5177b8dc9c2bba66 (diff)
downloadclasspath-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.c4
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