From fefe8fea0d8b7b1319db780fb7244eb5ff9edde2 Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 22 Sep 2024 19:45:47 +0000 Subject: [PATCH] testing/click: fix build with gcc 14 --- ...ad-fix-implicit-function-declaration.patch | 38 +++++++++++++++++++ testing/click/APKBUILD | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 testing/click/0002-gcc14-preload-fix-implicit-function-declaration.patch diff --git a/testing/click/0002-gcc14-preload-fix-implicit-function-declaration.patch b/testing/click/0002-gcc14-preload-fix-implicit-function-declaration.patch new file mode 100644 index 00000000000..6d3f78e8334 --- /dev/null +++ b/testing/click/0002-gcc14-preload-fix-implicit-function-declaration.patch @@ -0,0 +1,38 @@ +Source: https://gitlab.com/ubports/development/core/click/-/commit/8f654978a12e6f9a0b6ff64296ec5565e3ff5cd0.patch +-- +From 8f654978a12e6f9a0b6ff64296ec5565e3ff5cd0 Mon Sep 17 00:00:00 2001 +From: Ratchanan Srirattanamet +Date: Thu, 4 Apr 2024 01:46:32 +0700 +Subject: [PATCH] preload: fix -Wimplicit-function-declaration + +Copy the declarations of __fxstat{,64} from GLibC so that they're +properly declared. +--- + preload/clickpreload.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/preload/clickpreload.c b/preload/clickpreload.c +index 2799bff..ba6b9e7 100644 +--- a/preload/clickpreload.c ++++ b/preload/clickpreload.c +@@ -439,6 +439,8 @@ int __xmknod (int ver, const char *pathname, mode_t mode, dev_t *dev) + return (*libc___xmknod) (ver, pathname, mode, dev); + } + ++extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf); ++ + int __xstat (int ver, const char *pathname, struct stat *buf) + { + if (!libc___xstat) +@@ -450,6 +452,8 @@ int __xstat (int ver, const char *pathname, struct stat *buf) + return (*libc___xstat) (ver, pathname, buf); + } + ++extern int __fxstat64 (int ver, int __fildes, struct stat64 *__stat_buf); ++ + int __xstat64 (int ver, const char *pathname, struct stat64 *buf) + { + if (!libc___xstat64) +-- +GitLab + diff --git a/testing/click/APKBUILD b/testing/click/APKBUILD index de0849d74a2..45798543469 100644 --- a/testing/click/APKBUILD +++ b/testing/click/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Luca Weiss pkgname=click pkgver=0.5.2 -pkgrel=2 +pkgrel=3 pkgdesc="Simplified packaging format" url="https://gitlab.com/ubports/development/core/click" arch="all" @@ -30,6 +30,7 @@ makedepends=" subpackages="$pkgname-dev $pkgname-doc $pkgname-pyc" source="https://gitlab.com/ubports/development/core/click/-/archive/$pkgver/click-$pkgver.tar.gz 0001-configure.ac-fix-building-against-BusyBox-sed.patch + 0002-gcc14-preload-fix-implicit-function-declaration.patch " options="!check" # Needs dpkg @@ -61,4 +62,5 @@ package() { sha512sums=" 56244d2baa71bbfc168f57e4eea30a5ee0bde6da6e92e2063ede97d2ef93d44123a1af7a0c1610090ae48a9cf77e2daa554e9407454b7f8f53d1f655956e9cb0 click-0.5.2.tar.gz 40cf041438fae2a916c4277ebedca005338c011697248b69568b49559fe7f2a482199eeafe7704b54e73cf5e85c6c78022c750e29efc083aef1e7213314b3e34 0001-configure.ac-fix-building-against-BusyBox-sed.patch +6deb7c93f0e617444cf1e9343b58d57e109f764a1f0198ad61cfcbf95c759d2c0e0a94e750f48c4ac1ef72fb788c691b54915205ed6b41c442620f1932f149c3 0002-gcc14-preload-fix-implicit-function-declaration.patch "