SHA256
1
0
forked from pool/openafs
openafs/e428053.diff
Christof Hanke cfa65eea8c Accepting request 1170220 from home:hauky:branches:filesystems
- update to openafs-1.8.11
- apply upstream patches for kernel 6.8
  * 056a7a8.diff
  * 05ac614.diff
  * 073adec.diff
  * 0d9f6cf.diff
  * 0e983a9.diff
  * 112fb94.diff
  * 1e1bf8e.diff
  * 2056ce8.diff
  * 5312d06.diff
  * 67e48c8.diff
  * 6b20756.diff
  * 743d72f.diff
  * 7cae97b.diff
  * 81b910a.diff
  * 87ab04a.diff
  * 9f052c1.diff
  * a14a9ad.diff
  * a87845d.diff
  * aae8b00.diff
  * b77b304.diff
  * d1c89ac.diff
  * d9f3a2c.diff
  * db91384.diff
  * dffd0e1.diff
  * e0f425a.diff
  * e157f8f.diff
  * e428053.diff
  * ef7b8c5.diff
  * f5bafb0.diff
  * fca6fd9.diff

OBS-URL: https://build.opensuse.org/request/show/1170220
OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=123
2024-04-26 04:08:22 +00:00

66 lines
2.4 KiB
Diff

From e428053b5bc1250fdcc3ed8ac52ee798d96ad284 Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Tue, 05 Mar 2024 07:40:08 -0700
Subject: [PATCH] rxgen: Declare generated PKG_OpCodeStats()
The function {PKG}_OpCodeStats() is generated by rxgen, however a
prototype for the function is not generated.
The functions h_ProcMainBody_setup() and h_HeadofOldStyleProc_setup()
in rpc_parse.c emit prototypes for {PKG}_ExecuteRequest() and
{PKG}_TranslateOpCode(), but do not emit a prototype for
{PKG}_OpCodeStats().
Update rxgen to emit a function prototype for {PKG}_OpCodeStats() in the
generated header file.
Use a variable to point to "PackagePrefix[PackageIndex]" in
h_ProcMainBody_setup to improve readability.
{PKG}_OpCodeStats(), specifically RXSTATS_OpCodeStats(), is flagged due
to a missing prototype when building against a Linux 6.8 kernel (which
sets the -Wmissing-declarations and -Wmissing-prototypes compiler flags
as default). Linux 6.8 commit: 'Makefile.extrawarn: turn on
missing-prototypes globally' (0fcb70851f). When building against a
kernel with CONFIG_WERROR=y, the build fails.
Reviewed-on: https://gerrit.openafs.org/15631
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 26bb4d143b31ba027cf2721ac731df67a174c43b)
Change-Id: I9072d22d142b5b7a2f59b0cfc4026066ef1d9501
---
diff --git a/src/rxgen/rpc_parse.c b/src/rxgen/rpc_parse.c
index 59854f4..e648a66 100644
--- a/src/rxgen/rpc_parse.c
+++ b/src/rxgen/rpc_parse.c
@@ -2148,10 +2148,14 @@
static void
h_ProcMainBody_setup(void)
{
+ char *pprefix = PackagePrefix[PackageIndex];
f_print(fout,"\nextern int %s%sExecuteRequest(struct rx_call *);\n",
- prefix, PackagePrefix[PackageIndex]);
+ prefix, pprefix);
f_print(fout,"extern char * %s%sTranslateOpCode(int op);\n", prefix,
- PackagePrefix[PackageIndex]);
+ pprefix);
+ f_print(fout,"extern struct %s%sstats *%s%sOpCodeStats(int op);\n",
+ prefix, pprefix,
+ prefix, pprefix);
}
static void
@@ -2165,6 +2169,8 @@
f_print(fout,"\nextern int %sOpCodeIndex(int op);\n", PackagePrefix[PackageIndex]);
f_print(fout, "extern char * %s%sTranslateOpCode(int op);\n",
prefix, pprefix);
+ f_print(fout, "extern struct %s%sstats *%s%sOpCodeStats(int op);\n",
+ prefix, pprefix, prefix, pprefix);
}
void