Bug#837021: openjfx: FTBFS: PosixPlatform.cpp:235:10: error: 'wait' was not declared in this scope
Emmanuel Bourg
ebourg at apache.org
Tue Oct 25 13:13:11 UTC 2016
Control: tags -1 + help
I took a look at this issue, most of the errors can be fixed by adding
the -std=gnu++98 flag when building the fxpackager module (by patching
the LINUX.launcherlibrary.ccFlags line in the buildSrc/linux.gradle file).
There is one error left though:
modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp: In member function ‘virtual bool PosixProcess::Wait()’:
modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp:235:10: error: ‘wait’ was not declared in this scope
wait();
^
I'm not sure to understand why this no longer works with GCC 6. I think
I've figured out a fix but I need a C expert to review it:
--- a/modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp
+++ b/modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp
@@ -46,6 +46,7 @@
#include <iostream>
#include <dlfcn.h>
#include <signal.h>
+#include <sys/wait.h>
PosixPlatform::PosixPlatform(void) {
@@ -227,17 +228,17 @@ bool PosixProcess::Execute(const TString Application, const std::vector<TString>
bool PosixProcess::Wait() {
bool result = false;
int status;
pid_t wpid;
//TODO Use waitpid instead of wait
#ifdef LINUX
- wait();
+ wait(&status);
#endif
#ifdef MAC
wpid = wait(&status);
#endif
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
if (errno != EINTR){
status = -1;
More information about the pkg-java-maintainers
mailing list