$OpenBSD: patch-ipguard_c,v 1.4 2021/02/21 09:54:55 tb Exp $
Index: ipguard.c
--- ipguard.c.orig
+++ ipguard.c
@@ -29,6 +29,34 @@
 
 #include "ipguard.h"
 
+char iface[IFNAMSIZ];
+char ethers_name[PATH_MAX];
+char log_name[PATH_MAX];
+char pid_name[PATH_MAX];
+char fmac[18];
+char pcapf[PCAPFSIZ];
+char suser[MAXLOGNAME];
+int ethers_update;
+int fake_regen;
+int fake_num;
+int fake_time;
+int buffer_num;
+int addr_nosubst;
+int nofirst;
+int grant;
+int read_only;
+int duplex;
+int fixbc;
+int hidden;
+int promisc;
+int debug;
+int verbose;
+
+unsigned int all, good, grat, wgrat, zmac, zip, bad, bmac, bsip, btip,
+    bnew, bgrat, mymac, fake, pfake, nzh, nbe, mis;
+char pfmac[18];
+char s[128+1];
+
 void usage(char *name) {
     fprintf(stdout, "%s v%s (c) %s <%s>\n\n", NAME, VERSION, AUTHOR, MAIL);
     fprintf(stdout, "usage: %s [-h] [-ajgrxziovd]\n", name);
@@ -75,6 +103,7 @@ int main(int argc, char *argv[]) {
     srand((unsigned int) getpid());
 
     iface[0] = fmac[0] = pfmac[0] = pcapf[0] = log_name[0] = pid_name[0] = suser[0] = '\0';
+    strlcpy(suser, "_ipguard", MAXLOGNAME);
     strncpy(ethers_name, ETHERSFILE, PATH_MAX);
     strncpy(fmac, FAKEMAC, 18);
     ethers_update = ETHERSTO;
