]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/missing_ioprio: include the proper header file
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 20 Mar 2024 10:51:08 +0000 (11:51 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 20 Mar 2024 11:25:47 +0000 (12:25 +0100)
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
src/basic/missing_ioprio.h

index 0e5f40348483d71a2501cdd702ae50a88e437080..8d1cd8a9ed0ee7a0c153a941257ba975463fac64 100644 (file)
@@ -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(),
index 9cbd17279f20a1c569ee7e96f60ee6cccbfadaf2..a7e01dbf728e51bf180c92185fbd7a4498dd9bfd 100644 (file)
@@ -1,7 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <sched.h>
+#if HAVE_LINUX_IOPRIO_H
+#  include <linux/ioprio.h>
+#endif
 
 /* Match values uses by the kernel internally, as no public header seems to exist. */