kumquat-buildroot/package/fakeroot/0004-configure.ac-fix-__xmknod-at-pointer-argument.patch
Jörg Krause f45925a951 package/fakeroot: add upstream patches to fix glibc 2.33 compatibility
Glibc 2.33 removed `_STAT_VER`. On host machines, which updated to glibc
2.33, building host-fakeroot breaks:

```
In file included from communicate.h:20,
                 from libfakeroot.c:60:
libfakeroot.c: In function ‘chown’:
libfakeroot.c:99:40: error: ‘_STAT_VER’ undeclared (first use in this function)
   99 | #define INT_NEXT_STAT(a,b) NEXT_STAT64(_STAT_VER,a,b)
```

The issue has been discussed on some package maintainer threads, e.g.:
https://bugs.archlinux.org/task/69572
https://bugzilla.redhat.com/show_bug.cgi?id=1889862#c13

A patch series was prepared by Ilya Lipnitskiy which included two other
patches not related to the glibc 2.33 compatibility issue and submitted as
merge request for upstream:
https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg57280.html

Upstream accepted the merge request:
https://salsa.debian.org/clint/fakeroot/-/merge_requests/10

Note, that this patch series only contains the necessay patches for glibc
2.33 compatibility.

Tested on my Arch Linux machine, building a UBIFS/OverlayFS-based root
filesystem for an i.MX6ULL target board.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Tested-by: Bartosz Bilas <b.bilas@grinn-global.com>
[Peter: drop patch numbering (PATCH x/y) as pointed out by check-package]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-02-15 23:08:05 +01:00

67 lines
2.0 KiB
Diff

From 432dd46e662772020306a2ce8b1be38321697e69 Mon Sep 17 00:00:00 2001
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Date: Sat, 13 Feb 2021 19:32:08 -0800
Subject: [PATCH] configure.ac: fix __xmknod{,at} pointer argument
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Switch default to assume * and not the absence of *.
On glibc 2.33+, there is no definition for these functions in header
files, so the compile test doesn't work. But, we can default to using
the pointer (as is the case with newer glibc), and use the header file
on older platforms to fail the test and use no pointer.
Backported from: c3eebec293e35b997bb46c22fb5a4e114afb5e7f
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
---
configure.ac | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 73415d2..d85566f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -183,13 +183,13 @@ AC_MSG_CHECKING([for type of arg of __xmknod])
]], [[
int __xmknod ( int ver,
const char *pathname ,
- mode_t mode , dev_t dev);
+ mode_t mode , dev_t *dev);
]])],[
- AC_DEFINE(XMKNOD_FRTH_ARG,)
- AC_MSG_RESULT([no extra *])
- ],[
AC_DEFINE(XMKNOD_FRTH_ARG,[*])
AC_MSG_RESULT([needs *])
+ ],[
+ AC_DEFINE(XMKNOD_FRTH_ARG,)
+ AC_MSG_RESULT([no extra *])
])
@@ -210,13 +210,13 @@ AC_MSG_CHECKING([for type of arg of __xmknodat])
int __xmknodat ( int ver,
int dirfd,
const char *pathname ,
- mode_t mode , dev_t dev);
+ mode_t mode , dev_t *dev);
]])],[
- AC_DEFINE(XMKNODAT_FIFTH_ARG,)
- AC_MSG_RESULT([no extra *])
- ],[
AC_DEFINE(XMKNODAT_FIFTH_ARG,[*])
AC_MSG_RESULT([needs *])
+ ],[
+ AC_DEFINE(XMKNODAT_FIFTH_ARG,)
+ AC_MSG_RESULT([no extra *])
])
--
2.30.1