On Tue, Jun 3, 2025 at 10:28 AM Werner LEMBERG <[email protected]> wrote:
>
> > Windows uses its own LoadLibrary().
>
> Thanks, I've applied your patches

Thanks

> (and a slightly different one from
> Behdad regarding `RTLD_DEFAULT`).

Umm, no: Defining _GNU_SOURCE after including some of the system headers
makes it lose its effect entirely.  On my system, for e.g., RTLD_DEFAULT
is available, but ft-bb.c can not see it because of that.  I do suggest
moving it to top before including system headers (and they are included
through freetype headers.) Patch inlined below:

diff --git a/src/autofit/ft-hb.c b/src/autofit/ft-hb.c
index 8ea7192..300fe60 100644
--- a/src/autofit/ft-hb.c
+++ b/src/autofit/ft-hb.c
@@ -17,4 +17,8 @@


+#if !defined(_WIN32) && !defined(_GNU_SOURCE)
+#  define  _GNU_SOURCE  1  /* for RTLD_DEFAULT */
+#endif
+
 #include <freetype/freetype.h>
 #include <freetype/internal/ftmemory.h>
@@ -46,5 +50,4 @@
 #else /* !_WIN32 */

-#  define  _GNU_SOURCE  1  /* for RTLD_DEFAULT */
 #  include <dlfcn.h>

--
O.S.

Reply via email to