changeset 10869:6d279ecfacd1

8189689: JavaFX build fails with gcc 6 Summary: fix wait(status) + linux gradle build Reviewed-by: kcr, lbourges Contributed-by: ebourg@apache.org
author lbourges
date Fri, 09 Mar 2018 23:11:45 +0100
parents d27327f09524
children 8fbac224331c
files buildSrc/linux.gradle modules/jdk.packager/src/main/native/library/common/PosixPlatform.cpp
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/buildSrc/linux.gradle	Fri Mar 09 08:52:07 2018 -0800
+++ b/buildSrc/linux.gradle	Fri Mar 09 23:11:45 2018 +0100
@@ -250,7 +250,7 @@
 
 LINUX.launcherlibrary = [:]
 LINUX.launcherlibrary.compiler = compiler
-LINUX.launcherlibrary.ccFlags = ["-Wextra", "-Wformat", "-Wformat-security", "-DJAVAARCH=\"$OS_ARCH\"", "-I$JDK_HOME/include", "-I$JDK_HOME/include/linux", "-c", "-fPIC"]
+LINUX.launcherlibrary.ccFlags = ["-Wextra", "-Wformat", "-Wformat-security", "-DJAVAARCH=\"$OS_ARCH\"", "-I$JDK_HOME/include", "-I$JDK_HOME/include/linux", "-c", "-fPIC", "-std=gnu++98"]
 LINUX.launcherlibrary.linker = linker
 LINUX.launcherlibrary.linkFlags = ["-ldl", "-lpthread", "-shared" ]
 if (!IS_64) {
--- a/modules/jdk.packager/src/main/native/library/common/PosixPlatform.cpp	Fri Mar 09 08:52:07 2018 -0800
+++ b/modules/jdk.packager/src/main/native/library/common/PosixPlatform.cpp	Fri Mar 09 23:11:45 2018 +0100
@@ -46,6 +46,7 @@
 #include <sys/sysctl.h>
 #include <sys/file.h>
 #include <sys/stat.h>
+#include <sys/wait.h>
 #include <errno.h>
 #include <limits.h>
 #include <pwd.h>
@@ -380,7 +381,7 @@
     pid_t wpid = 0;
 
 #ifdef LINUX
-    wait();
+    wait(&status);
 #endif
 #ifdef MAC
     wpid = wait(&status);