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 /libexec | |
parent | 302ab0eb27f8f98527072595258584949ce62fe8 (diff) | |
download | src-test2-3a166b33235fab2284b4709062f43d8f467a74e1.tar.gz src-test2-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 'libexec')
-rw-r--r-- | libexec/ypxfr/ypxfr_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ypxfr/ypxfr_main.c b/libexec/ypxfr/ypxfr_main.c index d7eb75a94c51..6ea877a49925 100644 --- a/libexec/ypxfr/ypxfr_main.c +++ b/libexec/ypxfr/ypxfr_main.c @@ -53,6 +53,8 @@ __FBSDID("$FreeBSD$"); #include <rpcsvc/ypxfrd.h> #include "ypxfr_extern.h" +int debug = 1; + char *progname = "ypxfr"; char *yp_dir = _PATH_YP; int _rpcpmstart = 0; @@ -176,8 +178,6 @@ main(int argc, char *argv[]) int interdom = 0; int secure = 0; - debug = 1; - if (!isatty(fileno(stderr))) { openlog("ypxfr", LOG_PID, LOG_DAEMON); _rpcpmstart = 1; |