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.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include <sys/stat.h>
#include <unistd.h>
#include "alloc-util.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <getopt.h>
+#include <sys/stat.h>
#include "sd-varlink.h"
#pragma once
#include <fcntl.h>
+#include <sys/stat.h>
#include "compress.h"
#include "forward.h"
#include <stdlib.h>
#include <sys/mman.h>
+#include <sys/stat.h>
#include "alloc-util.h"
#include "bitfield.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/resource.h>
+#include <sys/stat.h>
#include <unistd.h>
#include "sd-bus.h"