001-Fix-compiler_state_t.ai-usage-when-INET6-is-not-defi.patch 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From 64aa033a061c43fc15c711f2490ae41d23b868c3 Mon Sep 17 00:00:00 2001
  2. From: Fabio Berton <fabio.berton@ossystems.com.br>
  3. Date: Thu, 17 Nov 2016 09:44:42 -0200
  4. Subject: [PATCH 1/2] Fix compiler_state_t.ai usage when INET6 is not defined
  5. Organization: O.S. Systems Software LTDA.
  6. Fix error:
  7. /
  8. | ../libpcap-1.8.1/gencode.c: In function 'pcap_compile':
  9. | ../libpcap-1.8.1/gencode.c:693:8: error: 'compiler_state_t
  10. | {aka struct _compiler_state}' has no member named 'ai'
  11. | cstate.ai = NULL;
  12. \
  13. Upstream-Status: Submitted [1]
  14. [1] https://github.com/the-tcpdump-group/libpcap/pull/541
  15. Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
  16. ---
  17. gencode.c | 2 ++
  18. 1 file changed, 2 insertions(+)
  19. diff --git a/gencode.c b/gencode.c
  20. index a887f27..e103c70 100644
  21. --- a/gencode.c
  22. +++ b/gencode.c
  23. @@ -690,7 +690,9 @@ pcap_compile(pcap_t *p, struct bpf_program *program,
  24. }
  25. initchunks(&cstate);
  26. cstate.no_optimize = 0;
  27. +#ifdef INET6
  28. cstate.ai = NULL;
  29. +#endif
  30. cstate.ic.root = NULL;
  31. cstate.ic.cur_mark = 0;
  32. cstate.bpf_pcap = p;
  33. --
  34. 2.1.4