dlfcn-util: add static asserts ensuring our sym_xyz() func ptrs match the types from...
authorLennart Poettering <lennart@poettering.net>
Wed, 16 Nov 2022 20:37:20 +0000 (21:37 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 21 Nov 2022 15:13:17 +0000 (16:13 +0100)
commit7736a71fd2c4f0704db2e0d110959f817829cb85
treecf46ad874a24607341e783fac5de3109ed6e629b
parent28795f2c138203fb700fc394f0937708af886116
dlfcn-util: add static asserts ensuring our sym_xyz() func ptrs match the types from the official headers

Make sure that the sym_xyz function pointers have the types that the
functions we'll assign them have.

And of course, this found a number of incompatibilities right-away, in
particular in the bpf hookup.

(Doing this will trigger deprecation warnings from libbpf. I simply
turned them off locally now, since we are well aware of what we are
doing in that regard.)

There's one return type fix (bool → int), that actually matters I think,
as it might have created an incompatibility on some archs.
src/shared/bpf-compat.h
src/shared/bpf-dlopen.c
src/shared/bpf-dlopen.h
src/shared/cryptsetup-util.c
src/shared/dlfcn-util.h
src/shared/idn-util.c
src/shared/idn-util.h