Skip to content

Commit

Permalink
Fix compilation error when not using ClamAV
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Dec 28, 2024
1 parent 00cea44 commit 3e3d8c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sniff2ban.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,9 @@ main(int argc, char *const *argv)
interface = pcap_lookupdev(errbuf);
if(verbose && interface)
printf("%s: Monitoring %s for malware\n", argv[0], interface);
#ifdef CLAMD_CONF
sockname = argv[optind++];
#endif
} else {
if(optind != (argc - 2)) {
if(!getsocknamefromclamdconf(buf)) {
Expand All @@ -554,9 +556,13 @@ main(int argc, char *const *argv)
}
if(verbose >= 2)
printf("%s: Using %s as the ClamAV socket\n", argv[0], buf);
#ifdef CLAMD_CONF
sockname = buf;
} else
sockname = argv[optind++];
#else
}
#endif
interface = NULL;
}
#elif defined(CLAMD_CONF)
Expand Down

0 comments on commit 3e3d8c2

Please sign in to comment.