This fixes a warning that causes a build failure when compiling with -Werror on
GCC 4.3.3.
ChangeLog:
2009-02-03 Andrew John Hughes <[email protected]>
* native/jni/native-lib/cpproc.c:
(cpproc_forkAndExec): Handle return of
chdir.
--
Andrew :)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
Index: native/jni/native-lib/cpproc.c
===================================================================
RCS file: /sources/classpath/classpath/native/jni/native-lib/cpproc.c,v
retrieving revision 1.4
diff -u -u -r1.4 cpproc.c
--- native/jni/native-lib/cpproc.c 11 Apr 2007 21:32:57 -0000 1.4
+++ native/jni/native-lib/cpproc.c 4 Feb 2009 03:09:06 -0000
@@ -86,7 +86,9 @@
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