View | Details | Raw Unified | Return to bug 272517 | Differences between
and this patch

Collapse All | Expand All

(-)b/devel/gettext-runtime/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
# discretion.
3
# discretion.
4
4
5
PORTNAME=	gettext-runtime
5
PORTNAME=	gettext-runtime
6
PORTREVISION=	0
6
PORTREVISION=	1
7
7
8
COMMENT=	GNU gettext runtime libraries and programs
8
COMMENT=	GNU gettext runtime libraries and programs
9
WWW=		https://www.gnu.org/software/gettext/
9
WWW=		https://www.gnu.org/software/gettext/
(-)b/devel/gettext-runtime/files/patch-intl_osdep.c (-1 / +27 lines)
Added Link Here
0
- 
1
--- intl/osdep.c.orig	2019-05-11 11:29:32 UTC
2
+++ intl/osdep.c
3
@@ -18,6 +18,24 @@
4
 # include "intl-exports.c"
5
 #elif defined __EMX__ && !defined __KLIBC__
6
 # include "os2compat.c"
7
+#elif defined __FreeBSD__
8
+#include <config.h>
9
+#include <sys/param.h>
10
+#include <dlfcn.h>
11
+#include <pthread.h>
12
+static __attribute__((constructor)) void
13
+libintl_init (void)
14
+{
15
+#if __FreeBSD_version >= 1400094
16
+  /* We don't link with libpthread to avoid overhead for non-threaded
17
+     programs.  Instead we dlopen it with RTLD_NOLOAD here to ensure
18
+     it is initialised when present.  */
19
+  (void) dlopen ("libpthread.so", RTLD_LAZY | RTLD_GLOBAL | RTLD_NOLOAD);
20
+#else
21
+  /* This hack also triggers libpthread initialisation.  */
22
+  (void) pthread_self ();
23
+#endif
24
+}
25
 #else
26
 /* Avoid AIX compiler warning.  */
27
 typedef int dummy;

Return to bug 272517