diff options
-rw-r--r-- | user/nfs-utils/APKBUILD | 4 | ||||
-rw-r--r-- | user/nfs-utils/ssize_t.patch | 84 | ||||
-rw-r--r-- | user/nfs-utils/time64.patch | 123 |
3 files changed, 211 insertions, 0 deletions
diff --git a/user/nfs-utils/APKBUILD b/user/nfs-utils/APKBUILD index 43685cc59..c762afc58 100644 --- a/user/nfs-utils/APKBUILD +++ b/user/nfs-utils/APKBUILD @@ -16,6 +16,8 @@ source="https://downloads.sourceforge.net/nfs/nfs-utils-$pkgver.tar.xz nfs-utils-1.1.4-mtab-sym.patch nfsdcld.patch posixish.patch + ssize_t.patch + time64.patch undef-def.patch exports @@ -63,6 +65,8 @@ sha512sums="60cd74294d0a68f481a962a0ece6ac6385b933d1f2b0e733ef098d6ce4d4177da811 afa0b913a21880f91580a2953cbd9057310367d406d2fff9d9985ec24f20288191600d81bf58daf6e3de376866b02662e573e59478e859f455d94f225d884465 nfs-utils-1.1.4-mtab-sym.patch 2f4c519cce81b2a29ffe2b7554cb5e524fde32db1338442f9ecbdf5d468552d1ad406918b3710340239bba741f5316742ee209fd5b76c5ccd10e466d7beaefa1 nfsdcld.patch 10501b1956e81b3a3db0829fcfb6f25d734d33be1cbc9169ff45594d8db355a337f61f41ec59e51484e5c5bcb77b2f969527edd477528621f8866ae412ddf03f posixish.patch +7cb1de79c2a420ff5121e19e5fdcbc97d367451ec59bc2fc39c2d60dde8d7136b227fc88e16996ede8365ed512004269d4b47ee19c62c8f8e0266430b0b85f06 ssize_t.patch +128fb10ca703a4e0d3dbd5f94d233e10cf917df7a565b8d3112f195d24697b96d71663459f7e7c2a4290ebe327762bfdc65e22a507a68a645dca1c3f13b08319 time64.patch 1fbe6f017ddde9a2edc5b8a8a2958c8c4f8ccc8764e15b8817da3cc315a5529519782c34df6154d76e146c83ee9f911fa8590aefd6902c0de1f6e6d9855b9b04 undef-def.patch fd8052dc8e17eccb0bb1443f341c97ec7c9dac5824294cadf486d91475bc728d4bb69300034b528a690707520590f6675ee371f92e9838afc8ed88092ee0f220 exports bc11b073735ee86c96b9c249ee187f4d16329c279a4e26760875059d2b5fa1d510ef3e4df5ee9dfb2a3133d755e1eb5c323d2fadc432a0cf630191ec353ac535 nfs.confd diff --git a/user/nfs-utils/ssize_t.patch b/user/nfs-utils/ssize_t.patch new file mode 100644 index 000000000..16313890a --- /dev/null +++ b/user/nfs-utils/ssize_t.patch @@ -0,0 +1,84 @@ +--- nfs-utils-2.4.2/utils/nfsdcld/nfsdcld.c.old 2020-01-24 03:35:27.856939255 +0000 ++++ nfs-utils-2.4.2/utils/nfsdcld/nfsdcld.c 2020-01-24 04:34:24.349432698 +0000 +@@ -378,7 +378,7 @@ + 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 (%zd): %m", + __func__, wsize); + + /* reopen pipe, just to be sure */ +@@ -409,7 +409,7 @@ + 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 (%zd): %m", + __func__, wsize); + ret = cld_pipe_open(clnt); + if (ret) { +@@ -459,7 +459,7 @@ + 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 (%zd): %m", + __func__, wsize); + ret = cld_pipe_open(clnt); + if (ret) { +@@ -498,7 +498,7 @@ + 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 (%zd): %m", + __func__, wsize); + ret = cld_pipe_open(clnt); + if (ret) { +@@ -548,7 +548,7 @@ + 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 (%zd): %m", + __func__, wsize); + ret = cld_pipe_open(clnt); + if (ret) { +@@ -607,7 +607,7 @@ + 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 (%zd): %m", + __func__, wsize); + ret = cld_pipe_open(clnt); + if (ret) { +@@ -667,7 +667,7 @@ + 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 (%zd): %m", + __func__, wsize); + ret = cld_pipe_open(clnt); + if (ret) { +--- nfs-utils-2.4.2/tools/locktest/testlk.c.old 2019-11-13 17:09:41.000000000 +0000 ++++ nfs-utils-2.4.2/tools/locktest/testlk.c 2020-01-24 04:42:06.118844841 +0000 +@@ -5,6 +5,7 @@ + #include <stdlib.h> + #include <stdio.h> + #include <unistd.h> ++#include <inttypes.h> + #ifdef linux + #include <getopt.h> + #endif +@@ -81,7 +82,7 @@ + if (fl.l_type == F_UNLCK) { + printf("%s: no conflicting lock\n", fname); + } else { +- printf("%s: conflicting lock by %d on (%ld;%ld)\n", ++ printf("%s: conflicting lock by %d on (%"PRId64";%"PRId64")\n", + fname, fl.l_pid, fl.l_start, fl.l_len); + } + return 0; diff --git a/user/nfs-utils/time64.patch b/user/nfs-utils/time64.patch new file mode 100644 index 000000000..024402554 --- /dev/null +++ b/user/nfs-utils/time64.patch @@ -0,0 +1,123 @@ +--- nfs-utils-2.4.2/support/nfs/cacheio.c.old 2019-11-13 17:09:41.000000000 +0000 ++++ nfs-utils-2.4.2/support/nfs/cacheio.c 2020-01-24 03:32:30.296395221 +0000 +@@ -26,6 +26,7 @@ + #include <fcntl.h> + #include <time.h> + #include <errno.h> ++#include <inttypes.h> + + extern struct state_paths etab; + +@@ -234,7 +235,7 @@ + stb.st_mtime > now) + stb.st_mtime = time(0); + +- sprintf(stime, "%ld\n", stb.st_mtime); ++ sprintf(stime, "%"PRId64"\n", stb.st_mtime); + for (c=0; cachelist[c]; c++) { + int fd; + sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]); +--- nfs-utils-2.4.2/utils/idmapd/idmapd.c.old 2019-11-13 17:09:41.000000000 +0000 ++++ nfs-utils-2.4.2/utils/idmapd/idmapd.c 2020-01-24 03:35:05.459393437 +0000 +@@ -65,6 +65,7 @@ + #include <ctype.h> + #include <libgen.h> + #include <nfsidmap.h> ++#include <inttypes.h> + + #include "xlog.h" + #include "conffile.h" +@@ -172,7 +173,7 @@ + int fd; + char stime[32]; + +- sprintf(stime, "%ld\n", now); ++ sprintf(stime, "%"PRId64"\n", now); + fd = open(path, O_RDWR); + if (fd == -1) + return -1; +@@ -625,7 +626,7 @@ + /* Name */ + addfield(&bp, &bsiz, im.im_name); + /* expiry */ +- snprintf(buf1, sizeof(buf1), "%lu", ++ snprintf(buf1, sizeof(buf1), "%"PRIu64, + time(NULL) + cache_entry_expiration); + addfield(&bp, &bsiz, buf1); + /* Note that we don't want to write the id if the mapping +@@ -653,7 +654,7 @@ + snprintf(buf1, sizeof(buf1), "%u", im.im_id); + addfield(&bp, &bsiz, buf1); + /* expiry */ +- snprintf(buf1, sizeof(buf1), "%lu", ++ snprintf(buf1, sizeof(buf1), "%"PRIu64, + time(NULL) + cache_entry_expiration); + addfield(&bp, &bsiz, buf1); + /* Note we're ignoring the status field in this case; we'll +--- nfs-utils-2.4.2/utils/nfsdcld/sqlite.c.old 2019-11-13 17:09:41.000000000 +0000 ++++ nfs-utils-2.4.2/utils/nfsdcld/sqlite.c 2020-01-24 04:35:02.235281405 +0000 +@@ -512,7 +512,7 @@ + current_epoch = tcur; + recovery_epoch = trec; + ret = 0; +- xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu", ++ xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64, + __func__, current_epoch, recovery_epoch); + out: + sqlite3_finalize(stmt); +@@ -1223,7 +1223,7 @@ + + current_epoch = tcur; + recovery_epoch = trec; +- xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu", ++ xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64, + __func__, current_epoch, recovery_epoch); + + out: +@@ -1282,7 +1282,7 @@ + } + + recovery_epoch = 0; +- xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu", ++ xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64, + __func__, current_epoch, recovery_epoch); + + out: +--- nfs-utils-2.4.2/utils/nfsdcltrack/nfsdcltrack.c.old 2019-11-13 17:09:41.000000000 +0000 ++++ nfs-utils-2.4.2/utils/nfsdcltrack/nfsdcltrack.c 2020-01-24 04:40:06.871901242 +0000 +@@ -38,6 +38,7 @@ + #include <sys/inotify.h> + #include <dirent.h> + #include <limits.h> ++#include <inttypes.h> + #ifdef HAVE_SYS_CAPABILITY_H + #include <sys/prctl.h> + #include <sys/capability.h> +@@ -525,7 +526,7 @@ + if (*tail) + return -EINVAL; + +- xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime); ++ xlog(D_GENERAL, "%s: grace done. gracetime=%"PRId64, __func__, gracetime); + + ret = sqlite_remove_unreclaimed(gracetime); + +--- nfs-utils-2.4.2/utils/nfsdcltrack/sqlite.c.old 2019-11-13 17:09:41.000000000 +0000 ++++ nfs-utils-2.4.2/utils/nfsdcltrack/sqlite.c 2020-01-24 04:40:31.519202517 +0000 +@@ -48,6 +48,7 @@ + #include <fcntl.h> + #include <unistd.h> + #include <sqlite3.h> ++#include <inttypes.h> + #include <linux/limits.h> + + #include "xlog.h" +@@ -544,7 +545,7 @@ + int ret; + char *err = NULL; + +- ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %ld", ++ ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %"PRId64, + grace_start); + if (ret < 0) { + return ret; |