0002-libarptc-libarptc_incl.c-fix-build-with-O0.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 7d8285ae92253017a15282dd25f76d76eed49518 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Thu, 21 Apr 2022 13:43:23 +0200
  4. Subject: [PATCH] libarptc/libarptc_incl.c: fix build with -O0
  5. Fix the following build failure with -O0:
  6. libarptc/libarptc.c:48:21: error: redefinition of 'arpt_get_target'
  7. 48 | #define GET_TARGET arpt_get_target
  8. | ^~~~~~~~~~~~~~~
  9. libarptc/libarptc_incl.c:16:1: note: in expansion of macro 'GET_TARGET'
  10. 16 | GET_TARGET(STRUCT_ENTRY *e)
  11. | ^~~~~~~~~~
  12. In file included from .//include/libarptc/libarptc.h:7,
  13. from libarptc/libarptc.c:26:
  14. .//include/linux/netfilter_arp/arp_tables.h:196:43: note: previous definition of 'arpt_get_target' was here
  15. 196 | static __inline__ struct xt_entry_target *arpt_get_target(struct arpt_entry *e)
  16. | ^~~~~~~~~~~~~~~
  17. Fixes:
  18. - http://autobuild.buildroot.org/results/730dce4101e7afcee233067e2870603cd64b8a48
  19. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  20. ---
  21. libarptc/libarptc_incl.c | 8 --------
  22. 1 file changed, 8 deletions(-)
  23. diff --git a/libarptc/libarptc_incl.c b/libarptc/libarptc_incl.c
  24. index c4d5de3..441f2de 100644
  25. --- a/libarptc/libarptc_incl.c
  26. +++ b/libarptc/libarptc_incl.c
  27. @@ -11,14 +11,6 @@
  28. /* (C)1999 Paul ``Rusty'' Russell - Placed under the GNU GPL (See
  29. COPYING for details). */
  30. -#ifndef __OPTIMIZE__
  31. -STRUCT_ENTRY_TARGET *
  32. -GET_TARGET(STRUCT_ENTRY *e)
  33. -{
  34. - return (void *)e + e->target_offset;
  35. -}
  36. -#endif
  37. -
  38. static int sockfd = -1;
  39. static void *arptc_fn = NULL;
  40. --
  41. 2.35.1