mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
In previous commit of v12.0.0-85-g2c66b6d72c we've tried to solve
a problem where xdrproc_t is a prototype of a function which
takes only two arguments instead of three. See original commit
for more info. The fix consists of a config time check and
setting XDRPROC_T_3ARGS accordingly (in meson-config.h). This
works for nearly all of our code, except rpcgen which is
intentionally independent of the rest of the code. Therefore, the
macro has to be set extra - by specifying it on the compiler cmd
line.
Fixes: 2c66b6d72c
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
29 lines
513 B
Meson
29 lines
513 B
Meson
rpcgen_tests = files([
|
|
'test_generator.py',
|
|
'test_lexer.py',
|
|
'test_parser.py',
|
|
])
|
|
|
|
xdrproc_flags = []
|
|
if conf.has('XDRPROC_T_3ARGS')
|
|
xdrproc_flags += [ '-DXDRPROC_T_3ARGS' ]
|
|
endif
|
|
|
|
test_demo = executable(
|
|
'test_demo',
|
|
[ 'test_demo.c' ],
|
|
c_args: [
|
|
'-Dabs_srcdir="@0@"'.format(meson.current_source_dir()),
|
|
] + cc_flags_relaxed_frame_limit + xdrproc_flags,
|
|
dependencies: [
|
|
xdr_dep, glib_dep
|
|
],
|
|
)
|
|
|
|
test(
|
|
'test_demo',
|
|
test_demo,
|
|
workdir: meson.current_source_dir(),
|
|
suite: 'bin',
|
|
)
|