]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Capsicum support: Fix a 'not defined' macro error
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 6 Mar 2024 20:11:42 +0000 (21:11 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 7 Mar 2024 07:43:45 +0000 (08:43 +0100)
The error was:
In file included from ./tcpdump.c:158:
./interface.h:62:32: error: "HAVE_CAPSICUM" is not defined, evaluates
to 0 [-Werror=undef]
   62 |     (defined(HAVE_BPF_DUMP) && HAVE_CAPSICUM && !defined(bpf_dump))
      |                                ^~~~~~~~~~~~~

(cherry picked from commit bfc96b04831641376636337406aae7fe0fe65081)

interface.h

index 58e5ab33e51f4a0b1878929fa4cfcaf9ccb6bba5..c631c143bf6525673c22310581cac2586b125470 100644 (file)
@@ -63,7 +63,7 @@ struct bpf_program;
  * With Capsicum bpf_dump() may be not declared even if HAVE_BPF_DUMP is set.
  */
 #if !defined(HAVE_BPF_DUMP) || \
-    (defined(HAVE_BPF_DUMP) && HAVE_CAPSICUM && !defined(bpf_dump))
+    (defined(HAVE_BPF_DUMP) && defined(HAVE_CAPSICUM) && !defined(bpf_dump))
 extern void bpf_dump(const struct bpf_program *, int);
 
 #endif