From 7258971b13a44d64431afbd55f0b835a43f817d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 20 Mar 2024 11:51:08 +0100 Subject: [PATCH] basic/missing_ioprio: include the proper header file IOPRIO_* is defined in linux/ioprio.h, so we were always using our fallback definitions. The header list in meson.build is sorted. I'm not sure why it wasn't. --- meson.build | 5 +++-- src/basic/missing_ioprio.h | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 0e5f403484..8d1cd8a9ed 100644 --- a/meson.build +++ b/meson.build @@ -738,14 +738,15 @@ if not cc.has_header('sys/capability.h') error('POSIX caps headers not found') endif foreach header : ['crypt.h', + 'linux/ioprio.h', 'linux/memfd.h', + 'linux/time_types.h', 'linux/vm_sockets.h', 'sys/auxv.h', + 'sys/sdt.h', 'threads.h', 'valgrind/memcheck.h', 'valgrind/valgrind.h', - 'linux/time_types.h', - 'sys/sdt.h', ] conf.set10('HAVE_' + header.underscorify().to_upper(), diff --git a/src/basic/missing_ioprio.h b/src/basic/missing_ioprio.h index 9cbd17279f..a7e01dbf72 100644 --- a/src/basic/missing_ioprio.h +++ b/src/basic/missing_ioprio.h @@ -1,7 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include +#if HAVE_LINUX_IOPRIO_H +# include +#endif /* Match values uses by the kernel internally, as no public header seems to exist. */