]> The Tcpdump Group git mirrors - tcpdump/commitdiff
tcpdump.c: Fix a warning when HAVE_FORK and HAVE_VFORK are not defined
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 3 Apr 2025 06:23:03 +0000 (08:23 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Sat, 5 Apr 2025 14:20:52 +0000 (16:20 +0200)
The warning was:
tcpdump.c:226:13: warning: unused function 'child_cleanup'
  [-Wunused-function] static void child_cleanup(int);

(cherry picked from commit 56a7c968aa852a689d891c5bbd648c009c24fa2e)

tcpdump.c

index 74d78beb250415b5110d9a41f73acf8d535df3c3..e42d5ca9ab699850c6046f4c010d329fc463b889 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -244,7 +244,9 @@ static void warning(FORMAT_STRING(const char *), ...) PRINTFLIKE(1, 2);
 static NORETURN void exit_tcpdump(int);
 static void (*setsignal (int sig, void (*func)(int)))(int);
 static void cleanup(int);
+#if defined(HAVE_FORK) || defined(HAVE_VFORK)
 static void child_cleanup(int);
+#endif
 static void print_version(FILE *);
 static void print_usage(FILE *);
 #ifdef HAVE_PCAP_SET_TSTAMP_TYPE