From 8900e3e6f840b95c1c8126f9c283ca5c99f5f4fd Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 17 Sep 2022 05:16:32 +0100 Subject: gentoo auto-resync : 17:09:2022 - 05:16:32 --- ...tils-2.6.2-clang-Wlogical-not-parentheses.patch | 28 ++++++++ ...utils-2.6.2-clang-fix-function-prototypes.patch | 78 ++++++++++++++++++++++ ...tils-2.6.2-clang-more-function-prototypes.patch | 37 ++++++++++ 3 files changed, 143 insertions(+) create mode 100644 net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-Wlogical-not-parentheses.patch create mode 100644 net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-fix-function-prototypes.patch create mode 100644 net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-more-function-prototypes.patch (limited to 'net-fs/nfs-utils/files') diff --git a/net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-Wlogical-not-parentheses.patch b/net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-Wlogical-not-parentheses.patch new file mode 100644 index 000000000000..2ba9a45a024b --- /dev/null +++ b/net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-Wlogical-not-parentheses.patch @@ -0,0 +1,28 @@ +https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=896946e3c7f8ec1a02d4dc3a039e6cbbd2f611a9 + +From 896946e3c7f8ec1a02d4dc3a039e6cbbd2f611a9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 13 Sep 2022 11:42:03 -0400 +Subject: [PATCH] mountd: Check for return of stat function + +simplify the check, stat() return 0 on success -1 on failure + +Fixes clang reported errors e.g. + +| v4clients.c:29:6: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses] +| if (!stat("/proc/fs/nfsd/clients", &sb) == 0 || +| ^ ~~ + +Signed-off-by: Khem Raj +Signed-off-by: Steve Dickson +--- a/support/export/v4clients.c ++++ b/support/export/v4clients.c +@@ -26,7 +26,7 @@ void v4clients_init(void) + { + struct stat sb; + +- if (!stat("/proc/fs/nfsd/clients", &sb) == 0 || ++ if (stat("/proc/fs/nfsd/clients", &sb) != 0 || + !S_ISDIR(sb.st_mode)) + return; + if (clients_fd >= 0) diff --git a/net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-fix-function-prototypes.patch b/net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-fix-function-prototypes.patch new file mode 100644 index 000000000000..f223af883ad0 --- /dev/null +++ b/net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-fix-function-prototypes.patch @@ -0,0 +1,78 @@ +https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=167f2336b06e1bcbf26f45f2ddc4a535fed4d393 +https://bugs.gentoo.org/869254 + +From 167f2336b06e1bcbf26f45f2ddc4a535fed4d393 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 13 Sep 2022 11:44:05 -0400 +Subject: [PATCH] Fix function prototypes + +Clang is now erroring out on functions with out parameter types + +Fixes errors like +error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] + +Signed-off-by: Khem Raj +Signed-off-by: Steve Dickson +--- a/support/export/auth.c ++++ b/support/export/auth.c +@@ -82,7 +82,7 @@ check_useipaddr(void) + } + + unsigned int +-auth_reload() ++auth_reload(void) + { + struct stat stb; + static ino_t last_inode; +--- a/support/export/v4root.c ++++ b/support/export/v4root.c +@@ -198,7 +198,7 @@ static int v4root_add_parents(nfs_export *exp) + * looking for components of the v4 mount. + */ + void +-v4root_set() ++v4root_set(void) + { + nfs_export *exp; + int i; +--- a/support/export/xtab.c ++++ b/support/export/xtab.c +@@ -135,7 +135,7 @@ xtab_write(char *xtab, char *xtabtmp, char *lockfn, int is_export) + } + + int +-xtab_export_write() ++xtab_export_write(void) + { + return xtab_write(etab.statefn, etab.tmpfn, etab.lockfn, 1); + } +--- a/utils/exportfs/exportfs.c ++++ b/utils/exportfs/exportfs.c +@@ -69,14 +69,14 @@ static int _lockfd = -1; + * need these additional lockfile() routines. + */ + static void +-grab_lockfile() ++grab_lockfile(void) + { + _lockfd = open(lockfile, O_CREAT|O_RDWR, 0666); + if (_lockfd != -1) + lockf(_lockfd, F_LOCK, 0); + } + static void +-release_lockfile() ++release_lockfile(void) + { + if (_lockfd != -1) { + lockf(_lockfd, F_ULOCK, 0); +--- a/utils/mount/network.c ++++ b/utils/mount/network.c +@@ -179,7 +179,7 @@ static const unsigned long probe_mnt3_only[] = { + + static const unsigned int *nfs_default_proto(void); + #ifdef MOUNT_CONFIG +-static const unsigned int *nfs_default_proto() ++static const unsigned int *nfs_default_proto(void) + { + extern unsigned long config_default_proto; + /* diff --git a/net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-more-function-prototypes.patch b/net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-more-function-prototypes.patch new file mode 100644 index 000000000000..aecb29d3a7cf --- /dev/null +++ b/net-fs/nfs-utils/files/nfs-utils-2.6.2-clang-more-function-prototypes.patch @@ -0,0 +1,37 @@ +From daf6aa9b659078aebd202fffff59bd9a0ab685ce Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Fri, 16 Sep 2022 22:35:23 +0100 +Subject: [PATCH] Fix more function prototypes + +``` +regex.c:545:43: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] +struct trans_func *libnfsidmap_plugin_init() + ^ + void +1 error generated. +``` + +See: 167f2336b06e1bcbf26f45f2ddc4a535fed4d393 +Signed-off-by: Sam James +--- a/support/nfsidmap/regex.c ++++ b/support/nfsidmap/regex.c +@@ -542,7 +542,7 @@ struct trans_func regex_trans = { + .gss_princ_to_grouplist = regex_gss_princ_to_grouplist, + }; + +-struct trans_func *libnfsidmap_plugin_init() ++struct trans_func *libnfsidmap_plugin_init(void) + { + return (®ex_trans); + } +--- a/utils/idmapd/idmapd.c ++++ b/utils/idmapd/idmapd.c +@@ -867,7 +867,7 @@ nfsdreopen_one(struct idmap_client *ic) + } + + static void +-nfsdreopen() ++nfsdreopen(void) + { + nfsdreopen_one(&nfsd_ic[IC_NAMEID]); + nfsdreopen_one(&nfsd_ic[IC_IDNAME]); -- cgit v1.2.3