summaryrefslogtreecommitdiffstats
path: root/usr.sbin/acme-client
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2020-02-07 14:34:15 +0000
committerflorian <florian@openbsd.org>2020-02-07 14:34:15 +0000
commit3a92740d5deaf3fce21ae2e854e4b3a8e1f54a42 (patch)
tree24c6cf2e9867c697c76ae118558944b84e537cbb /usr.sbin/acme-client
parentfd(4): timeout_add(9) -> timeout_add_msec(9), tsleep(9) -> tsleep_nsec(9) (diff)
downloadwireguard-openbsd-3a92740d5deaf3fce21ae2e854e4b3a8e1f54a42.tar.xz
wireguard-openbsd-3a92740d5deaf3fce21ae2e854e4b3a8e1f54a42.zip
Do not define variables in extern.h since this will lead to duplicate
definitions in every source file that includes extern.h. From Michael Forney (mforney AT mforney DOT org), thanks! OK jca
Diffstat (limited to 'usr.sbin/acme-client')
-rw-r--r--usr.sbin/acme-client/extern.h6
-rw-r--r--usr.sbin/acme-client/main.c7
2 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/acme-client/extern.h b/usr.sbin/acme-client/extern.h
index e6b7af0d05b..daadc813b97 100644
--- a/usr.sbin/acme-client/extern.h
+++ b/usr.sbin/acme-client/extern.h
@@ -1,4 +1,4 @@
-/* $Id: extern.h,v 1.16 2019/06/17 12:42:52 florian Exp $ */
+/* $Id: extern.h,v 1.17 2020/02/07 14:34:15 florian Exp $ */
/*
* Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -277,12 +277,12 @@ char *json_fmt_signed(const char *, const char *, const char *);
/*
* Should we print debugging messages?
*/
-int verbose;
+extern int verbose;
/*
* What component is the process within (COMP__MAX for none)?
*/
-enum comp proccomp;
+extern enum comp proccomp;
__END_DECLS
diff --git a/usr.sbin/acme-client/main.c b/usr.sbin/acme-client/main.c
index 7cbeeb7de03..49ff1ae659a 100644
--- a/usr.sbin/acme-client/main.c
+++ b/usr.sbin/acme-client/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.52 2019/06/17 12:42:52 florian Exp $ */
+/* $Id: main.c,v 1.53 2020/02/07 14:34:15 florian Exp $ */
/*
* Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -32,6 +32,9 @@
#define WWW_DIR "/var/www/acme"
#define CONF_FILE "/etc/acme-client.conf"
+int verbose;
+enum comp proccomp;
+
int
main(int argc, char *argv[])
{
@@ -46,8 +49,6 @@ main(int argc, char *argv[])
int c, rc, revocate = 0;
int popts = 0;
pid_t pids[COMP__MAX];
- extern int verbose;
- extern enum comp proccomp;
size_t i, altsz, ne;
struct acme_conf *conf = NULL;