From 1a0b1a165972638df6190b7680592239baa7fd96c4f41b3ec0ffc2bc1007ade2 Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Thu, 26 Jun 2025 17:48:15 +0200 Subject: [PATCH] Fix build on Leap 16.0 --- ...build-check-for-__xstat-declarations.patch | 116 ++++++++++++++++++ kmod-testsuite.spec | 1 + kmod.changes | 6 + kmod.spec | 1 + 4 files changed, 124 insertions(+) create mode 100644 Revert-build-check-for-__xstat-declarations.patch diff --git a/Revert-build-check-for-__xstat-declarations.patch b/Revert-build-check-for-__xstat-declarations.patch new file mode 100644 index 0000000..78070f7 --- /dev/null +++ b/Revert-build-check-for-__xstat-declarations.patch @@ -0,0 +1,116 @@ +From de54204d2656053e5530d055468f55c2806eed69 Mon Sep 17 00:00:00 2001 +From: Michal Suchanek +Date: Thu, 26 Jun 2025 17:18:32 +0200 +Subject: [PATCH] Revert "build: check for __xstat declarations" + +This reverts commit 0766f541927f50879599e62fdaa5a2e51b9791d3. + +From commit description: + + Currently we check the function is resolved at link time. Although what + we really care is if the headers are silently transposing any of our stat + calls to __xstat{,64}. If so, we'd want to wrap the latter functions. + + As the now-removed comment says, glibc 2.33 was the first release to no + longer have static inline wrappers that do the transposition. See the + glibc commit 8ed005daf0ab ("Remove stat wrapper functions, move them to + exported symbols") for more details. + +The glibc in Leap 16.0 behaves as pre-2.33 in this respect (bsc#1240126 bsc#1221482) + +--- + configure.ac | 6 +++++- + meson.build | 4 ++-- + testsuite/path.c | 12 +++++++++++- + 3 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9443268a0b50..80cd18e7d8f8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -39,6 +39,7 @@ AC_PROG_CC_C99 + # Function and structure checks + ##################################################################### + ++AC_CHECK_FUNCS_ONCE(__xstat) + AC_CHECK_FUNCS_ONCE([open64 stat64 fopen64 __stat64_time64]) + AC_CHECK_FUNCS_ONCE([secure_getenv]) + +@@ -51,13 +52,16 @@ CC_CHECK_FUNC_BUILTIN([__builtin_umul_overflow], [ ], [ ]) + CC_CHECK_FUNC_BUILTIN([__builtin_umull_overflow], [ ], [ ]) + CC_CHECK_FUNC_BUILTIN([__builtin_umulll_overflow], [ ], [ ]) + ++# Non glibc compilers (musl and newer versions of bionic) do not need ++# the 64 LFS API wrapping. ++AC_CHECK_DECLS_ONCE([[__GLIBC__]], [], [], [[#include ]]) ++ + # dietlibc doesn't have st.st_mtim struct member + AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include ]) + + # basename may be only available in libgen.h with the POSIX behavior, + # not desired here + AC_CHECK_DECLS_ONCE([[basename]], [], [], [[#include ]]) +-AC_CHECK_DECLS_ONCE([[__xstat]], [], [], [[#include + +- Fix testsuite on Leap 16.0 (bsc#1240126) + * Revert-build-check-for-__xstat-declarations.patch + ------------------------------------------------------------------- Fri Mar 28 20:20:32 UTC 2025 - Jan Engelhardt diff --git a/kmod.spec b/kmod.spec index 77792da..637c23d 100644 --- a/kmod.spec +++ b/kmod.spec @@ -41,6 +41,7 @@ Patch3: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch Patch4: 0010-modprobe-Implement-allow-unsupported-modules.patch Patch5: 0011-Do-not-filter-unsupported-modules-when-running-a-van.patch Patch6: 0012-modprobe-print-unsupported-status.patch +Patch7: Revert-build-check-for-__xstat-declarations.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libopenssl-devel >= 1.1.0 -- 2.51.1