aboutsummaryrefslogtreecommitdiff
path: root/sbin/iscontrol
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-04-09 20:35:35 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-04-09 20:35:35 +0000
commit9a042535a9eb5ea8dd1b3e0d80483d02f1cba951 (patch)
tree454022fe0f67d3cb2aaebc89ff16c3c81493c520 /sbin/iscontrol
parenteca518d044a27d4b1b9b2391205b1a1c1104280f (diff)
downloadsrc-9a042535a9eb5ea8dd1b3e0d80483d02f1cba951.tar.gz
src-9a042535a9eb5ea8dd1b3e0d80483d02f1cba951.zip
MFC -fno-common fixes: r359389, r359394, r359397-r359399, r359403-r359404,
r359406, r359413-r359416, r359424-r359425, r359427, r359432-r359433, r359443, r359675-r359678 Note: this is not necessarily a complete fix to get these programs to build with -fno-common applied; further work may be needed in this branch. r359389: config(8): fixes for -fno-common Move this handful of definitions into main.c, properly declare these as extern in config.h. This fixes the config(8) build with -fno-common. Unexplained in my previous commit to gas, -fno-common will become the default in GCC10 and LLVM11, so it's worth addressing these in advance. r359394: MFV r359393: tcsh: import 6974bc35a5cd This removes an extra variable definition that causes the -fno-common build to fail, which will be a new default in GCC10/LLVM11. r359397: zfs: fix -fno-common issues A similar (or identical?) fix has already landed in OpenZFS. -fno-common will become the default in GCC10/LLVM11. r359398: sh: remove duplicate el definition el is declared extern in myhistedit.h and defined in histedit.c. Remove the duplicate definition in input.c to appease the -fno-common build. -fno-common will become the default in GCC10/LLVM11. r359399: telnet: remove some duplicate definitions, mark terminaltype extern Most of these were already properly declared and defined elsewhere, this is effectively just a minor cleanup that fixes the -fno-common build. -fno-common will become the default in GCC10/LLVM11. r359403: Revert 359399: telnet -fno-common bits There was a large misfire from my local diff that I need to investigate, and this version committed did not build. r359404: Re-apply r359399: telnet -fno-common fix line and auth_level's redefinitions are just extraneous telnetd will #define extern and then include ext.h to allocate storage for all of these extern'd vars; however, two of them are actually defined in libtelnet instead. Instead of doing an #ifdef extern dance around those function pointers, just add an EXTERN macro to make it easier to differentiate by sight which ones will get allocated in globals.c and which ones are defined elsewhere. r359406: telnet: kill off remaining duplicate definition r359413: ipfilter: remove duplicate definition of 'thishost' thishost is already defined in lib/initparse.c; no need for this one. This fixes the ipfilter build with -fno-common. -fno-common will become the default in GCC10/LLVM11. r359414: iscontrol: move definition of vflag/iscsidev to iscontrol.c Mark the declaration extern as these are used elsewhere; this fixes the build with -fno-common. r359415: userboot: mark host_fsops as extern This is already defined elsewhere; mark this declaration extern to the fix the -fno-common build. r359416: systat: remove redundant definition of kd kd is already properly declared in extern.h and defined in main.c, rendering this definition useless. This fixes the -fno-common build. r359424: openssh: -fno-common fix from upstream f47d72ddad This is currently staged in vendor/ as part of the 8.0p1 import, which isn't quite ready to land. Given that this is a simple one-line fix, apply it now as the fallout will be pretty minimal. -fno-common will become the default in GCC10/LLVM11. r359425: locate: fix -fno-common build Just a single variable declaration to extern and define elsewhere here, myctype. -fno-common will become a default in GCC10/LLVM11. r359427: fsck_ffs/fsdb: fix -fno-common build This one is also a small list: - 3x duplicate definition (ufs2_zino, returntosingle, nflag) - 5x 'needs extern', 3/5 of which are referenced in fsdb -fno-common will become the default in GCC10/LLVM11. r359432: gdb: compile with -fcommon explicitly As described in the comment, gdb relies on some of the linker magic that happens with -fcommon. I suspect the life expectancy of gdb-in-base is low enough that this isn't worth spending much time addressing, especially given the vintage. Hit it with the -fcommon hammer so that it continues to just work. r359433: bmake: fix -fno-common build debug was declared extern, but debug_file was not; correct this and define debug_file in main.c (as debug is) to fix the -fno-common build. -fno-common will become the default with GCC10/LLVM11. r359443: MFV r359442: bmake: import -fno-common fix build back from upstream sjg@ committed the local patch previously committed upstream; pull it in to vendor/ to ease any potential stress of future imports. r359675: kqueue tests: fix -fno-common build vnode_fd and kqfd are both shared among multiple CU; define them exactly once. In the case of vnode_fd, it was simply the declaration that needed correction. -fno-common will become the default in GCC10/LLVM11. r359676: ntpd: fix build with -fno-common Only a small nit here: psl should be declared extern and defined exactly once. -fno-common will become the default in GCC10/LLVM11. r359677: yp*: fix -fno-common build This is mostly two problems spread out far and wide: - ypldap_process should be declared properly - debug is defined differently in many programs For the latter, just extern it and define it everywhere that actually needs it. This mostly works out nicely for ^/libexec/ypxfr, which can remove the assignment at the beginning of main in favor of defining it properly. -fno-common will become the default in GCC10/LLVM11. r359678: indent: fix the -fno-common build Spread the globals far and wide, hopefully to the files that make the most sense. -fno-common will become the default in GCC10/LLVM11.
Notes
Notes: svn path=/stable/12/; revision=359753
Diffstat (limited to 'sbin/iscontrol')
-rw-r--r--sbin/iscontrol/iscontrol.c3
-rw-r--r--sbin/iscontrol/iscontrol.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/sbin/iscontrol/iscontrol.c b/sbin/iscontrol/iscontrol.c
index 967795ba8356..a623d0ca81e3 100644
--- a/sbin/iscontrol/iscontrol.c
+++ b/sbin/iscontrol/iscontrol.c
@@ -82,6 +82,9 @@ token_t DigestMethods[] = {
{0, 0}
};
+int vflag;
+char *iscsidev;
+
u_char isid[6 + 6];
/*
| Default values
diff --git a/sbin/iscontrol/iscontrol.h b/sbin/iscontrol/iscontrol.h
index cc7a6cb772e7..dddb21bb562e 100644
--- a/sbin/iscontrol/iscontrol.h
+++ b/sbin/iscontrol/iscontrol.h
@@ -149,8 +149,8 @@ int recvpdu(isess_t *sess, pdu_t *pp);
int lookup(token_t *tbl, char *m);
-int vflag;
-char *iscsidev;
+extern int vflag;
+extern char *iscsidev;
void parseArgs(int nargs, char **args, isc_opt_t *op);
void parseConfig(FILE *fd, char *key, isc_opt_t *op);