diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2020-04-06 23:16:05 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2020-04-06 23:16:05 +0000 |
commit | 3a166b33235fab2284b4709062f43d8f467a74e1 (patch) | |
tree | 6bb7be697f0aa9f348d5d9b61c31744ee388d0f7 /usr.sbin/rpc.yppasswdd | |
parent | 302ab0eb27f8f98527072595258584949ce62fe8 (diff) |
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.
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=359677
Diffstat (limited to 'usr.sbin/rpc.yppasswdd')
-rw-r--r-- | usr.sbin/rpc.yppasswdd/yppasswdd_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c index 349f1cd59e17..b48ba40aeeca 100644 --- a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c +++ b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c @@ -83,6 +83,7 @@ static int _rpcfdtype; #define _IDLE 0 #define _SERVED 1 #define _SERVING 2 +int debug; static char _localhost[] = "localhost"; static char _passwd_byname[] = "passwd.byname"; @@ -173,8 +174,6 @@ main(int argc, char *argv[]) char myname[MAXHOSTNAMELEN + 2]; int maxrec = RPC_MAXDATASIZE; - extern int debug; - debug = 1; while ((ch = getopt(argc, argv, "t:d:p:sfamuivh")) != -1) { |