]> git.ipfire.org Git - thirdparty/systemd.git/commit
tree-wide: include sys/stat.h where necessary
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Jul 2025 02:40:42 +0000 (11:40 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Jul 2025 03:44:10 +0000 (12:44 +0900)
commit83a047fe23238bebc91659394949c6046f66a78f
tree322b9554844f74654ec48e1d3a6ac8035a534b66
parent0ae2ac9759ebc3f94ce8d91884437363b9e8b504
tree-wide: include sys/stat.h where necessary

These source files uses symbols provided by sys/stat.h, e.g. struct stat,
S_IFREG, S_IFBLK, and so on. Let's explicitly include sys/stat.h where
necessary.

Glibc's fcntl.h includes bits/stat.h, which provides these symbols, so
these symbols can be used without explicitly including sys/stat.h. But,
based on the discussion in #37922, we should explicitly include relevant
headers, and should not rely on the indirect inclusion.

Similar to 4f18ff2e29b8054f30b084abcabf5f689f4b340b, but for sys/stat.h.
src/basic/env-file.c
src/bootctl/bootctl.c
src/libsystemd/sd-journal/journal-file.h
src/libsystemd/sd-journal/mmap-cache.c
src/run/run.c