On Thu, 5 Nov 2020 18:16:58 GMT, Jose Pereda <jper...@openjdk.org> wrote:
>> Johan Vos has updated the pull request incrementally with one additional >> commit since the last revision: >> >> change invocation of getEGLDisplayHandle into getEglDisplayHandle >> Conditionally add dlfcn > > Marked as reviewed by jpereda (Committer). The fix for the compile-time error still fails for target *armv6hf*: `MonocleGLFactory.c:110:19: error: ‘RTLD_DEFAULT’ undeclared (first use in this function)`. Here's one solution: --- a/modules/javafx.graphics/src/main/native-prism-es2/monocle/MonocleGLFactory.c +++ b/modules/javafx.graphics/src/main/native-prism-es2/monocle/MonocleGLFactory.c @@ -29,16 +29,13 @@ #include <string.h> #include <math.h> +#ifndef ANDROID_NDK +#define __USE_GNU +#endif #include <EGL/egl.h> #include "eglUtils.h" -#include "../PrismES2Defs.h" - #include "com_sun_prism_es2_MonocleGLContext.h" -#ifndef ANDROID -#define __USE_GNU -#include <dlfcn.h> -#endif extern void *get_dlsym(void *handle, const char *symbol, int warn); ``` Turns out `eglUtils.h` already includes `../PrismES2Defs.h`, which also includes `<dlfcn.h>` and defines `__USE_GNU` if it's not already defined. I'm still trying to understand why we need to define `__USE_GNU` ahead of time right at the top there. I'll add another comment if I figure it out. ------------- PR: https://git.openjdk.java.net/jfx/pull/343