[PATCH] rpcgen: Pass XDRPROC_T_3ARGS to test_demo.c
From: Michal Privoznik <mprivozn@redhat.com> 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: 2c66b6d72cd48d3cf80f957f55cfb1548feb46c4 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- scripts/rpcgen/tests/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/rpcgen/tests/meson.build b/scripts/rpcgen/tests/meson.build index 057a61433d..4df7471a99 100644 --- a/scripts/rpcgen/tests/meson.build +++ b/scripts/rpcgen/tests/meson.build @@ -4,13 +4,17 @@ rpcgen_tests = files([ '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, + ] + cc_flags_relaxed_frame_limit + xdrproc_flags, dependencies: [ xdr_dep, glib_dep ], -- 2.52.0
On Tue, Feb 03, 2026 at 10:17:43AM +0100, Michal Privoznik via Devel wrote:
From: Michal Privoznik <mprivozn@redhat.com>
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: 2c66b6d72cd48d3cf80f957f55cfb1548feb46c4 Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
I guess that's a fair way to do it Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Michal Privoznik via Devel wrote:
From: Michal Privoznik <mprivozn@redhat.com>
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: 2c66b6d72cd48d3cf80f957f55cfb1548feb46c4 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- scripts/rpcgen/tests/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/rpcgen/tests/meson.build b/scripts/rpcgen/tests/meson.build index 057a61433d..4df7471a99 100644 --- a/scripts/rpcgen/tests/meson.build +++ b/scripts/rpcgen/tests/meson.build @@ -4,13 +4,17 @@ rpcgen_tests = files([ '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, + ] + cc_flags_relaxed_frame_limit + xdrproc_flags, dependencies: [ xdr_dep, glib_dep ], -- 2.52.0
Thanks for fixing that! The aarch64-macos-14 job is now green, so hopefully that's it about this issue. Roman
participants (3)
-
Martin Kletzander -
Michal Privoznik -
Roman Bogorodskiy