From: Antonio Alvarez Feijoo Date: Tue, 9 Apr 2024 12:21:08 +0000 (+0200) Subject: test-date: add missing header X-Git-Tag: v256-rc1~250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c62676e4b1abfd2a40086c1bc0eb1adafa3c653;p=thirdparty%2Fsystemd.git test-date: add missing header ``` [587/2863] Compiling C object test-date.p/src_test_test-date.c.o FAILED: test-date.p/src_test_test-date.c.o cc -Itest-date.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/shared -I../src/shared -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fno-strict-aliasing -fvisibility=hidden -fno-omit-frame-pointer -include config.h -DTEST_CODE=1 -MD -MQ test-date.p/src_test_test-date.c.o -MF test-date.p/src_test_test-date.c.o.d -o test-date.p/src_test_test-date.c.o -c ../src/test/test-date.c ../src/test/test-date.c: In function ‘main’: ../src/test/test-date.c:86:13: error: implicit declaration of function ‘access’; did you mean ‘accept’? [-Werror=implicit-function-declaration] 86 | if (access("/usr/share/zoneinfo/Asia/Seoul", F_OK) >= 0) { | ^~~~~~ | accept ../src/test/test-date.c:86:13: warning: nested extern declaration of ‘access’ [-Wnested-externs] ../src/test/test-date.c:86:54: error: ‘F_OK’ undeclared (first use in this function) 86 | if (access("/usr/share/zoneinfo/Asia/Seoul", F_OK) >= 0) { | ^~~~ ../src/test/test-date.c:86:54: note: each undeclared identifier is reported only once for each function it appears in cc1: some warnings being treated as errors ninja: build stopped: subcommand failed. ``` Fixes ae4088b23e1658a6f6e940d6e1c8d0a14f93449b --- diff --git a/src/test/test-date.c b/src/test/test-date.c index 2b96983e2cb..c7d239e22fd 100644 --- a/src/test/test-date.c +++ b/src/test/test-date.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include + #include "alloc-util.h" #include "string-util.h" #include "tests.h"