]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: add detection of xdrproc_t arguments count
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 31 Jan 2026 09:19:35 +0000 (10:19 +0100)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Mon, 2 Feb 2026 18:03:34 +0000 (19:03 +0100)
commit2c66b6d72cd48d3cf80f957f55cfb1548feb46c4
tree7feec53e92a0a756eaa57731b77d1d47036aac0f
parent74fc02d792f7ee55d2e0a7b9ad4e6d751c36ceb8
build: add detection of xdrproc_t arguments count

According to 9fa3a8ab6fd82ad2f5a14b490696085061418718,
macOS insists on passing 3 arguments for xdrproc_t.

Passing 3 arguments was a good common ground, but since
recently[1] FreeBSD only accepts 2 arguments.

Add a meson.build check whether 3 arguments are accepted,
and add macros which passes either 2 or 3 arguments to
xdrproc_t based on the result of this check.

1: https://cgit.freebsd.org/src/commit/?id=ac5a19ec6989675c8ec6c3ca245dba243d1a6416

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
meson.build
scripts/rpcgen/tests/test_demo.c
src/rpc/virnetmessage.c