aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-04-06 23:16:05 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-04-06 23:16:05 +0000
commit3a166b33235fab2284b4709062f43d8f467a74e1 (patch)
tree6bb7be697f0aa9f348d5d9b61c31744ee388d0f7 /usr.sbin/rpc.yppasswdd/yppasswdd_main.c
parent302ab0eb27f8f98527072595258584949ce62fe8 (diff)
downloadsrc-3a166b33235fab2284b4709062f43d8f467a74e1.tar.gz
src-3a166b33235fab2284b4709062f43d8f467a74e1.zip
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/yppasswdd_main.c')
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_main.c3
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) {