From: Thomas Weißschuh Date: Sat, 15 Apr 2023 08:57:02 +0000 (+0200) Subject: build-sys: try to always use 64bit time support on glibc X-Git-Tag: v2.40-rc1~47^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f6e7a21ce91df5a0051a47d175408ebc77b3d7b3;p=thirdparty%2Futil-linux.git build-sys: try to always use 64bit time support on glibc Signed-off-by: Thomas Weißschuh --- diff --git a/configure.ac b/configure.ac index 752d995d1b..a03f3c4428 100644 --- a/configure.ac +++ b/configure.ac @@ -280,6 +280,8 @@ UL_SET_ARCH([HPPA], [hppa*|parisc*]) AC_SYS_LARGEFILE AC_HEADER_ASSERT AC_STRUCT_TIMEZONE +UL_YEAR2038_INIT +AC_SYS_YEAR2038_RECOMMENDED dnl Don't forget to maintain alternatively allowed versions in autogen.sh! AM_GNU_GETTEXT_VERSION([0.18.3]) diff --git a/tools/oss-fuzz.sh b/tools/oss-fuzz.sh index 4aa7f23b09..c94a5f94df 100755 --- a/tools/oss-fuzz.sh +++ b/tools/oss-fuzz.sh @@ -24,8 +24,17 @@ if [[ "$SANITIZER" == undefined ]]; then CXXFLAGS+=" $UBSAN_FLAGS" fi +CONFIGURE_ARGS="--disable-all-programs --enable-libuuid --enable-libfdisk --enable-last --enable-fuzzing-engine --enable-libmount --enable-libblkid" + +LIBC_VERSION="$(dpkg -s libc6 | grep Version | cut -d' ' -f2)" + +# Ubuntu focal uses glibc 2.31 but 2.34 is necessary +if dpkg --compare-versions "$LIBC_VERSION" 'lt' '2.34'; then + CONFIGURE_ARGS="$CONFIGURE_ARGS --disable-year2038" +fi + ./autogen.sh -./configure --disable-all-programs --enable-libuuid --enable-libfdisk --enable-last --enable-fuzzing-engine --enable-libmount --enable-libblkid +./configure $CONFIGURE_ARGS make -j$(nproc) V=1 check-programs for d in "$(dirname $0)"/../tests/ts/fuzzers/test_*_fuzz_files; do