Unlike libc, kernel headers use long long for 64-bit types. __SANE_USERSPACE_TYPES__ needs to be defined for the exceptions. Fixes -Wformat warnings about llu being used instead of lu. Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx> --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index 900377fa..15b16971 100644 --- a/meson.build +++ b/meson.build @@ -69,6 +69,12 @@ elif host_machine.system() == 'freebsd' v4l2_utils_incdir_arr += 'contrib/freebsd/include' endif +# These platforms default to __[us]64 as long. Add this define to get long long +# as is done elsewhere. +if host_machine.cpu_family() in ['alpha', 'mips64', 'ppc64'] + add_project_arguments('-D__SANE_USERSPACE_TYPES__', language: ['c', 'cpp']) +endif + v4l2_utils_incdir = include_directories(v4l2_utils_incdir_arr) prog_bash = find_program('bash') -- 2.45.2