*/*: fix build with gettext 1.0

This commit is contained in:
naddy
2026-03-23 19:02:40 +00:00
parent 25c9e2f110
commit d7b61e94f5
45 changed files with 527 additions and 20 deletions
@@ -0,0 +1,16 @@
libintl.h must provide the wrapper for newlocale() before the
function is used by the spa plugin headers.
Index: lib/wp/wp.c
--- lib/wp/wp.c.orig
+++ lib/wp/wp.c
@@ -7,8 +7,8 @@
*/
#include "wp.h"
-#include <pipewire/pipewire.h>
#include <libintl.h>
+#include <pipewire/pipewire.h>
#include "wpbuildbasedirs.h"
WP_DEFINE_LOCAL_LOG_TOPIC ("wp")
@@ -0,0 +1,17 @@
libintl.h must provide the wrapper for newlocale() before the
function is used by the spa plugin headers.
Index: modules/module-lua-scripting/api/api.c
--- modules/module-lua-scripting/api/api.c.orig
+++ modules/module-lua-scripting/api/api.c
@@ -8,9 +8,9 @@
#include <glib/gstdio.h>
#include <wp/wp.h>
+#include <libintl.h>
#include <pipewire/pipewire.h>
#include <wplua/wplua.h>
-#include <libintl.h>
#define WP_LOCAL_LOG_TOPIC log_topic_lua_scripting
WP_LOG_TOPIC_EXTERN (log_topic_lua_scripting)
@@ -0,0 +1,16 @@
Forcing XPG5 removes locale_t from <locale.h>.
This breaks including libintl.h, since gettext is built with locale_t
in view.
Index: src/audio_dec/xine_a52_spdif.c
--- src/audio_dec/xine_a52_spdif.c.orig
+++ src/audio_dec/xine_a52_spdif.c
@@ -23,7 +23,7 @@
#define _DEFAULT_SOURCE 1
#ifndef __sun
/* required for swab() */
-#define _XOPEN_SOURCE 500
+/* #define _XOPEN_SOURCE 500 */
#endif
/* avoid compiler warnings */
#define _BSD_SOURCE 1
@@ -0,0 +1,16 @@
Forcing XPG5 removes locale_t from <locale.h>.
This breaks including libintl.h, since gettext is built with locale_t
in view.
Index: src/audio_dec/xine_lpcm_decoder.c
--- src/audio_dec/xine_lpcm_decoder.c.orig
+++ src/audio_dec/xine_lpcm_decoder.c
@@ -27,7 +27,7 @@
#define _DEFAULT_SOURCE 1
#ifndef __sun
-#define _XOPEN_SOURCE 500
+/* #define _XOPEN_SOURCE 500 */
#endif
/* avoid compiler warnings */
#define _BSD_SOURCE 1
@@ -0,0 +1,16 @@
Forcing XPG5 removes locale_t from <locale.h>.
This breaks including libintl.h, since gettext is built with locale_t
in view.
Index: src/xitk/main.c
--- src/xitk/main.c.orig
+++ src/xitk/main.c
@@ -20,7 +20,7 @@
*
*/
/* required for getsubopt(); the __sun test gives us strncasecmp() on solaris */
-#if !defined(__sun) && ! defined(__FreeBSD__) && ! defined(__NetBSD__) && ! defined(__DragonFly__)
+#if !defined(__sun) && ! defined(__FreeBSD__) && ! defined(__NetBSD__) && ! defined(__DragonFly__) && ! defined(__OpenBSD__)
#define _XOPEN_SOURCE 500
#endif
/* required for strncasecmp() */