Merge branch 'c99-main' into 'main'

Build base and good with the c99 c_std option

Closes #1602

See merge request gstreamer/gstreamer!3466
This commit is contained in:
Ignacio Casal 2024-05-03 21:56:42 +00:00
commit 6c2afaf842
7 changed files with 50 additions and 8 deletions

View file

@ -1093,6 +1093,14 @@ if build_gstgl
# case-insensitive FS would include gst-libs/gl/egl/egl.h as EGL/egl.h.
common_args += '-I@0@'.format(meson.current_build_dir())
system = host_machine.system()
if system in ['linux', 'android']
common_args += [
'-D_GNU_SOURCE',
]
endif
gstgl = library('gstgl-' + api_version,
gl_sources, gl_egl_sources, gl_x11_sources, gl_wayland_sources, gl_viv_fb_sources, gl_priv_sources, gl_enumtypes_c, gl_enumtypes_h,
c_args : common_args,

View file

@ -32,17 +32,31 @@ rtsp_enums = gnome.mkenums_simple('gstrtsp-enumtypes',
gstrtsp_c = rtsp_enums[0]
gstrtsp_h = rtsp_enums[1]
if host_system == 'windows'
compile_args = [
'-DBUILDING_GST_RTSP',
'-DG_LOG_DOMAIN="GStreamer-RTSP"'
]
# OS-specific settings
system = host_machine.system()
if system == 'windows'
winsock2 = cc.find_library('ws2_32')
else
winsock2 = []
if system in ['linux', 'android']
compile_args += [
'-D_GNU_SOURCE',
]
endif
endif
gstrtsp_deps = [gst_base_dep, gst_dep, gio_dep, libm, winsock2]
gst_rtsp = library('gstrtsp-@0@'.format(api_version),
rtsp_sources,
gstrtsp_h, gstrtsp_c,
c_args : gst_plugins_base_args + ['-DBUILDING_GST_RTSP', '-DG_LOG_DOMAIN="GStreamer-RTSP"'],
c_args : gst_plugins_base_args + compile_args,
include_directories: [configinc, libsinc],
version : libversion,
soversion : soversion,

View file

@ -12,12 +12,21 @@ tcp_sources = [
]
if core_conf.has('HAVE_SYS_SOCKET_H')
tcp_sources += 'gstmultifdsink.c'
tcp_sources += 'gstmultifdsink.c'
endif
system = host_machine.system()
compile_args = []
if system in ['linux', 'android']
compile_args += [
'-D_GNU_SOURCE',
]
endif
gsttcp = library('gsttcp',
tcp_sources,
c_args : gst_plugins_base_args,
c_args : gst_plugins_base_args + compile_args,
include_directories: [configinc, libsinc],
dependencies : [gst_base_dep, gst_net_dep, gio_dep],
install : true,

View file

@ -2,7 +2,8 @@ project('gst-plugins-base', 'c',
version : '1.25.0.1',
meson_version : '>= 1.1',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
'buildtype=debugoptimized',
'c_std=c99' ])
gst_version = meson.project_version()
version_arr = gst_version.split('.')

View file

@ -8,9 +8,18 @@ udp_sources = [
'gstudpnetutils.c'
]
system = host_machine.system()
compile_args = []
if system in ['linux', 'android']
compile_args += [
'-D_GNU_SOURCE',
]
endif
gstudp = library('gstudp',
udp_sources,
c_args : gst_plugins_good_args,
c_args : gst_plugins_good_args + compile_args,
include_directories : [configinc, libsinc],
dependencies : [gst_dep, gstbase_dep, gstnet_dep, gio_dep],
install : true,

View file

@ -2,7 +2,8 @@ project('gst-plugins-good', 'c',
version : '1.25.0.1',
meson_version : '>= 1.1',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
'buildtype=debugoptimized',
'c_std=c99' ])
gst_version = meson.project_version()
version_arr = gst_version.split('.')

View file

@ -62,7 +62,7 @@ if have_v4l2
gstv4l2 = library('gstvideo4linux2',
v4l2_sources,
c_args : gst_plugins_good_args,
c_args : gst_plugins_good_args + ['-D_GNU_SOURCE'],
include_directories : [configinc, libsinc],
dependencies : [gstbase_dep, gstvideo_dep, gstallocators_dep, gudev_dep, libv4l2_dep],
install : true,