core/nfs-utils: fix

This commit is contained in:
Kevin Mihelich 2019-11-19 03:49:07 +00:00
parent 4949be6f4c
commit 6d7f715ece
2 changed files with 115 additions and 0 deletions

View file

@ -0,0 +1,111 @@
From 20bd9add2fb4d96de28c28d25c2971e6ca011a33 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Mon, 18 Nov 2019 20:41:03 -0700
Subject: [PATCH] 32-bit fixes
---
utils/nfsdcld/nfsdcld.c | 14 +++++++-------
utils/nfsdcld/sqlite.c | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/utils/nfsdcld/nfsdcld.c b/utils/nfsdcld/nfsdcld.c
index b064336d..6d8f502d 100644
--- a/utils/nfsdcld/nfsdcld.c
+++ b/utils/nfsdcld/nfsdcld.c
@@ -378,7 +378,7 @@ cld_not_implemented(struct cld_client *clnt)
bsize = cld_message_size(cmsg);
wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
if (wsize != bsize)
- xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+ xlog(L_ERROR, "%s: problem writing to cld pipe (%d): %m",
__func__, wsize);
/* reopen pipe, just to be sure */
@@ -409,7 +409,7 @@ cld_get_version(struct cld_client *clnt)
xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
if (wsize != bsize) {
- xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+ xlog(L_ERROR, "%s: problem writing to cld pipe (%d): %m",
__func__, wsize);
ret = cld_pipe_open(clnt);
if (ret) {
@@ -459,7 +459,7 @@ reply:
xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
if (wsize != bsize) {
- xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+ xlog(L_ERROR, "%s: problem writing to cld pipe (%d): %m",
__func__, wsize);
ret = cld_pipe_open(clnt);
if (ret) {
@@ -498,7 +498,7 @@ reply:
cmsg->cm_status);
wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
if (wsize != bsize) {
- xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+ xlog(L_ERROR, "%s: problem writing to cld pipe (%d): %m",
__func__, wsize);
ret = cld_pipe_open(clnt);
if (ret) {
@@ -548,7 +548,7 @@ reply:
cmsg->cm_status);
wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
if (wsize != bsize) {
- xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+ xlog(L_ERROR, "%s: problem writing to cld pipe (%d): %m",
__func__, wsize);
ret = cld_pipe_open(clnt);
if (ret) {
@@ -607,7 +607,7 @@ reply:
xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
if (wsize != bsize) {
- xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+ xlog(L_ERROR, "%s: problem writing to cld pipe (%d): %m",
__func__, wsize);
ret = cld_pipe_open(clnt);
if (ret) {
@@ -667,7 +667,7 @@ reply:
xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
if (wsize != bsize) {
- xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+ xlog(L_ERROR, "%s: problem writing to cld pipe (%d): %m",
__func__, wsize);
ret = cld_pipe_open(clnt);
if (ret) {
diff --git a/utils/nfsdcld/sqlite.c b/utils/nfsdcld/sqlite.c
index 23be7971..ec60a056 100644
--- a/utils/nfsdcld/sqlite.c
+++ b/utils/nfsdcld/sqlite.c
@@ -512,7 +512,7 @@ sqlite_startup_query_grace(void)
current_epoch = tcur;
recovery_epoch = trec;
ret = 0;
- xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu",
+ xlog(D_GENERAL, "%s: current_epoch=%llu recovery_epoch=%llu",
__func__, current_epoch, recovery_epoch);
out:
sqlite3_finalize(stmt);
@@ -1223,7 +1223,7 @@ sqlite_grace_start(void)
current_epoch = tcur;
recovery_epoch = trec;
- xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu",
+ xlog(D_GENERAL, "%s: current_epoch=%llu recovery_epoch=%llu",
__func__, current_epoch, recovery_epoch);
out:
@@ -1282,7 +1282,7 @@ sqlite_grace_done(void)
}
recovery_epoch = 0;
- xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu",
+ xlog(D_GENERAL, "%s: current_epoch=%llu recovery_epoch=%llu",
__func__, current_epoch, recovery_epoch);
out:
--
2.23.0

View file

@ -7,6 +7,7 @@
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - set -D_FILE_OFFSET_BITS=64 in CFLAGS
# - patch to fix 32-bit FTBFS
pkgbase=nfs-utils
pkgname=('nfs-utils' 'nfsidmap')
@ -17,10 +18,12 @@ url='http://nfs.sourceforge.net'
makedepends=('libevent' 'sqlite' 'rpcsvc-proto')
# http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=summary
source=(https://www.kernel.org/pub/linux/utils/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.{xz,sign}
0001-32-bit-fixes.patch
exports)
# https://www.kernel.org/pub/linux/utils/nfs-utils/2.1.1/sha256sums.asc
sha256sums=('4464737a03d5f73ded2ffefe19d5543ed7b1d6c541985d8acaafdc8025aa1038'
'SKIP'
'574e20ae6346b8f2314b8612194049c89e27bf3ae1f0342e1c6f1d9033df2603'
'610715ed3daedc43b2536f541c7c57e138fb31eab5d837d9a6187a7403e30154')
validpgpkeys=('E1B71E339E20A10A676F7CB69AFB1D681A125177') # Steve Dickson
@ -30,6 +33,7 @@ prepare() {
# fix hardcoded sbin path to our needs
sed -i "s|sbindir = /sbin|sbindir = /usr/bin|g" utils/*/Makefile.am
sed -i "s|sbin|bin|" utils/nfsidmap/id_resolver.conf
[[ $CARCH != "aarch64" ]] && patch -p1 -i ../0001-32-bit-fixes.patch
autoreconf -vfi
}