]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
namespace-util,nsresource: explicitly include sched.h
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 25 Jun 2025 16:03:26 +0000 (01:03 +0900)
committerMike Yuan <me@yhndnzj.com>
Sun, 6 Jul 2025 11:28:46 +0000 (13:28 +0200)
These source files uses symbols provided by sched.h, e.g.
setns(), unshare(), CLONE_NEWNS, and friends, but they do not explicitly
include sched.h. Currently, it is included indirectly via missing_syscall.h,
which is included by e.g. pidfd-util.h.
Let's explicitly include headers that provides symbols used in the code.

This is similar to 4f18ff2e29b8054f30b084abcabf5f689f4b340b, but for sched.h.

src/basic/namespace-util.c
src/nsresourced/nsresourcework.c

index 35a8693cb1c5fcd560ef36770308983f4ffbeebd..ba1941a0a535c557a3e8c7acf44f3d8b7a69a254 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
+#include <sched.h>
 #include <sys/ioctl.h>
 #include <sys/mount.h>
 #include <unistd.h>
index 7157106c0863e1734d95012943044e82616b8f1a..236d4d4acd1c284cbf3fd51400389a9e60446bee 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/veth.h>
 #include <net/if.h>
 #include <poll.h>
+#include <sched.h>
 #include <sys/eventfd.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>