summaryrefslogtreecommitdiff
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
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.
-rw-r--r--ChangeLog6
-rw-r--r--native/jni/native-lib/cpproc.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9514fbf1e..13b0826f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2009-02-03 Andrew John Hughes <ahughes@redhat.com>
+ * native/jni/native-lib/cpproc.c:
+ (cpproc_forkAndExec): Handle return of
+ chdir.
+
+2009-02-03 Andrew John Hughes <ahughes@redhat.com>
+
PR classpath/38417:
* gnu/java/security/jce/prng/SecureRandomAdapter.java:
Remove unneeded import.
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