aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2020-07-09 10:51:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2020-07-09 10:52:29 +0000
commit350cae08318021b2b8fc9695170cefdea1454689 (patch)
treec31223c0917671de5b139b0a82ccd3422dcdcdbf
parent376cd0a41f1ab0b154b539ed33f74dac0ef13ee8 (diff)
downloadaports-350cae08318021b2b8fc9695170cefdea1454689.tar.gz
aports-350cae08318021b2b8fc9695170cefdea1454689.tar.bz2
aports-350cae08318021b2b8fc9695170cefdea1454689.tar.xz
main/nfs-utils: time64 build fix
-rw-r--r--main/nfs-utils/APKBUILD4
-rw-r--r--main/nfs-utils/musl-time64.patch51
2 files changed, 54 insertions, 1 deletions
diff --git a/main/nfs-utils/APKBUILD b/main/nfs-utils/APKBUILD
index 16c2e75690..23a1211a32 100644
--- a/main/nfs-utils/APKBUILD
+++ b/main/nfs-utils/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nfs-utils
pkgver=2.5.1
-pkgrel=0
+pkgrel=1
pkgdesc="kernel-mode NFS"
url="https://linux-nfs.org/"
arch="all"
@@ -18,6 +18,7 @@ source="https://www.kernel.org/pub/linux/utils/nfs-utils/$pkgver/nfs-utils-$pkgv
musl-configure_ac.patch
musl-getservbyport.patch
musl-svcgssd-sysconf.patch
+ musl-time64.patch
nfs.initd
nfsmount.initd
@@ -115,6 +116,7 @@ sha512sums="efd90c3a436aacb9d267c2c787a1e57166933c8da7e2e5ace7251d04e5d4e0b9993f
3f245b1870a47998d90cee191dba528dede7d2e18abad3f045864f95039057cda5a22708d89fcc086eeed452729c397a0284c73c1c7037277943a9890504e250 musl-configure_ac.patch
94d7ba23164660f1da9298494dff75c57f5a300cb32b2922bc2226fcdaded7eaaa0c50a59a145ac7c75639d177558b5f5594fb1f03a50f60f4c577c93b135748 musl-getservbyport.patch
52eeade44753f2002bf99d58ad4982086aab74ef8b14de46be547f23508197f58a6ff529145f96de7f031ac0bb7779b648d05fd981cdd91556dd13d068dfe57b musl-svcgssd-sysconf.patch
+8efc48cdc6f8cfafe476241f95ca8dc89ac7b3402d4230d20ef1e066990c542b8350f9b11f495cc261f25f1a705e35445fa89ca729f0d162e0ed44b0d8a47344 musl-time64.patch
f7feb79cfcab0478affb640d1e5ad059757c88d51cc790fd54cde2fd7ed2e3cfd8f7f4c2de993d99da03e8ce3bdfb2750a4cb997b850fe33d0ef76d9b91c9018 nfs.initd
89259b9f0878658d48792b5b2f42b43c966ed098dba1fecf9e07fb0de4aab37ad67655ea8dbcc2361ddab2b5013b2de35a03048a513aaeedf790e4b416a35a54 nfsmount.initd
6e23897885cc33c49d9c7353b456585a1e0c7300822edba81bc48ba4ccc18297adce137260cc0aa9487aa5ef0aab3eecf931532cfa5bd40fd03bc9e0ddacfb28 nfsmount.confd
diff --git a/main/nfs-utils/musl-time64.patch b/main/nfs-utils/musl-time64.patch
new file mode 100644
index 0000000000..62a1d1e11a
--- /dev/null
+++ b/main/nfs-utils/musl-time64.patch
@@ -0,0 +1,51 @@
+diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c
+index b45a904..6b1049f 100644
+--- a/utils/nfsdcltrack/nfsdcltrack.c
++++ b/utils/nfsdcltrack/nfsdcltrack.c
+@@ -25,9 +25,11 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <ctype.h>
+ #include <errno.h>
+ #include <stdbool.h>
++#include <stdint.h>
++#include <inttypes.h>
++#include <ctype.h>
+ #include <getopt.h>
+ #include <string.h>
+ #include <sys/stat.h>
+@@ -525,7 +527,8 @@ cltrack_gracedone(const char *timestr)
+ if (*tail)
+ return -EINVAL;
+
+- xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime);
++ xlog(D_GENERAL, "%s: grace done. gracetime=%" PRId64, __func__,
++ (int64_t)gracetime);
+
+ ret = sqlite_remove_unreclaimed(gracetime);
+
+diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c
+index 2801201..c4e0cdf 100644
+--- a/utils/nfsdcltrack/sqlite.c
++++ b/utils/nfsdcltrack/sqlite.c
+@@ -42,6 +42,8 @@
+ #include <errno.h>
+ #include <event.h>
+ #include <stdbool.h>
++#include <stdint.h>
++#include <inttypes.h>
+ #include <string.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+@@ -544,8 +546,8 @@ sqlite_remove_unreclaimed(time_t grace_start)
+ int ret;
+ char *err = NULL;
+
+- ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %ld",
+- grace_start);
++ ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %" PRId64,
++ (int64_t)grace_start);
+ if (ret < 0) {
+ return ret;
+ } else if ((size_t)ret >= sizeof(buf)) {