diff mbox series

[FFmpeg-devel,RFC,2/2] configure: disable locale use in spa plugin

Message ID 20230920184058.1263793-2-abhishek.ojha@savoirfairelinux.com
State New
Headers show
Series [FFmpeg-devel,RFC,1/2] libavdevice/pipewiregrab: add pipewire based grab | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Abhishek Ojha Sept. 20, 2023, 6:40 p.m. UTC
This commit requires to resolve the compilation error of pipewiregrab
because Pipewire's spa plugin is requesting locale_t extension to
compile.
Which was added in POSIX 2008 but ffmpeg is using POSIX 2001 due to
which spa plugin complains. __LOCALE_C_ONLY flag is set to disable
the locale usage in spa plugin. Adding it in configure file fix both
the library test and source compilation issue.
Not sure if this is the right approach to fix the issue.
Feedback/Suggestions will be highly appreciated.

Signed-off-by: Abhishek Ojha <abhishek.ojha@savoirfairelinux.com>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/configure b/configure
index 325b10484f..e14a8e5bcb 100755
--- a/configure
+++ b/configure
@@ -7045,6 +7045,8 @@  if enabled libxcb; then
     enabled libxcb_xfixes && check_pkg_config libxcb_xfixes xcb-xfixes xcb/xfixes.h xcb_xfixes_get_cursor_image
 fi
 
+# _POSIX_C_SOURCE=200112 doesn't support locale
+add_cppflags -D__LOCALE_C_ONLY
 enabled libpipewire && check_pkg_config libpipewire "libpipewire-0.3 >= 0.3.40" pipewire/pipewire.h pw_init
 if enabled libpipewire; then
     enabled libgio_unix && check_pkg_config libgio_unix gio-unix-2.0 gio/gio.h g_main_loop_new