freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ft-hb.c: define _GNU_SOURCE for RTLD_DEFAULT


From: Behdad Esfahbod
Subject: Re: [PATCH] ft-hb.c: define _GNU_SOURCE for RTLD_DEFAULT
Date: Wed, 4 Jun 2025 11:54:58 -0600

Hi Werner,

I suggest applying this as well, which is what you describe in my commit but is not actually done in the code:

```patch
diff --git a/src/autofit/ft-hb.c b/src/autofit/ft-hb.c
index bcb4c932f..3c145d046 100644
--- a/src/autofit/ft-hb.c
+++ b/src/autofit/ft-hb.c
@@ -101,8 +101,11 @@
 #else /* !_WIN32 */
 
 #  ifdef RTLD_DEFAULT
+#    define FT_RTLD_FLAGS RTLD_LAZY | RTLD_GLOBAL
     lib             = RTLD_DEFAULT;
     version_atleast = DLSYM( lib, hb_version_atleast );
+#  else
+#    define FT_RTLD_FLAGS RTLD_LAZY
 #  endif
 
     if ( !version_atleast )
@@ -116,7 +119,7 @@
        * variables, and closing the library will cause them to be
        * invalidated.
        */
-      lib = dlopen( FT_LIBHARFBUZZ, RTLD_LAZY | RTLD_GLOBAL );
+      lib = dlopen( FT_LIBHARFBUZZ, FT_RTLD_FLAGS );
       if ( !lib )
         goto Fail;
       version_atleast = DLSYM( lib, hb_version_atleast );
```





On Mon, Jun 2, 2025 at 10:36 PM Werner LEMBERG <wl@gnu.org> wrote:

> RTLD_DEFAULT may be guarded by __USE_GNU which then would lead to build
> failures. [...]

Thanks for your two patches; I will soon take care of them.


    Werner


reply via email to

[Prev in Thread] Current Thread [Next in Thread]