wine icon indicating copy to clipboard operation
wine copied to clipboard

port: Don't define dlopen etc. when dlfcn.h is available

Open cwabbott0 opened this issue 3 years ago • 1 comments

Otherwise I get the following build error:

In file included from ../../wine/include/wine/port.h:114,
                 from ../../wine/libs/port/getopt.c:31:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/dlfcn.h:53:20: error: conflicting types for 'dlerror'
   53 | DLFCN_EXPORT char *dlerror(void);
      |                    ^~~~~~~
In file included from ../../wine/libs/port/getopt.c:31:
../../wine/include/wine/port.h:61:27: note: previous definition of 'dlerror' was here
   61 | static inline const char *dlerror(void) { return "No dlopen support on Windows"; }
      |                           ^~~~~~~
make[2]: *** [Makefile:196739: libs/port/getopt.o] Error 1

This seems to be because building the guest wine on aarch64 uses mingw as the "host" compiler and this library is built with the host toolchain.

cwabbott0 avatar Jul 06 '21 08:07 cwabbott0

@stefand

AndreRH avatar Jul 10 '21 19:07 AndreRH