2
1

0001-packet-gtp-c-remove-unneeded-named-structures.patch 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. From 020e25b660250c97c8085e64cf85074ccfcdd06b Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Tue, 5 Mar 2019 20:59:49 +0100
  4. Subject: [PATCH] packet-gtp.c: remove unneeded named structures
  5. In uclibc, _header is already in sigcontext.h:
  6. packet-gtp.c:2361:16: error: redefinition of 'struct _header'
  7. typedef struct _header {
  8. ^~~~~~~
  9. In file included from /home/dawncrow/buildroot-test/scripts/instance-0/output/host/i686-buildroot-linux-uclibc/sysroot/usr/include/bits/sigcontext.h:30:0,
  10. from /home/dawncrow/buildroot-test/scripts/instance-0/output/host/i686-buildroot-linux-uclibc/sysroot/usr/include/signal.h:311,
  11. from /home/dawncrow/buildroot-test/scripts/instance-0/output/host/i686-buildroot-linux-uclibc/sysroot/usr/include/glib-2.0/glib/gbacktrace.h:36,
  12. from /home/dawncrow/buildroot-test/scripts/instance-0/output/host/i686-buildroot-linux-uclibc/sysroot/usr/include/glib-2.0/glib.h:34,
  13. from ../../epan/proto.h:28,
  14. from ../../epan/packet.h:14,
  15. from packet-gtp.c:43:
  16. /home/dawncrow/buildroot-test/scripts/instance-0/output/host/i686-buildroot-linux-uclibc/sysroot/usr/include/asm/sigcontext.h:173:8: note: originally defined here
  17. struct _header {
  18. To fix this issue, transform _header and other named structures (with
  19. the exception of gtp_conv_info_t) into unnamed structures
  20. Fixes:
  21. - http://autobuild.buildroot.org/results/c41d42fe3489bc63c42e7ce7a9eccb1b4ca7b9b2
  22. Change-Id: I78116233c2a8dd7c54723b7cb558254bd5143bd2
  23. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  24. Reviewed-on: https://code.wireshark.org/review/32335
  25. Petri-Dish: Guy Harris <guy@alum.mit.edu>
  26. Tested-by: Petri Dish Buildbot
  27. Reviewed-by: Guy Harris <guy@alum.mit.edu>
  28. [Retrieved from:
  29. https://github.com/wireshark/wireshark/commit/020e25b660250c97c8085e64cf85074ccfcdd06b]
  30. ---
  31. epan/dissectors/packet-gtp.c | 8 ++++----
  32. 1 file changed, 4 insertions(+), 4 deletions(-)
  33. diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c
  34. index 4c40e7aa54..971197e4ae 100644
  35. --- a/epan/dissectors/packet-gtp.c
  36. +++ b/epan/dissectors/packet-gtp.c
  37. @@ -2170,7 +2170,7 @@ GHashTable* session_table;
  38. /* Relation between <teid,ip> -> frame */
  39. wmem_tree_t* frame_tree;
  40. -typedef struct gtp_info {
  41. +typedef struct {
  42. guint32 teid;
  43. guint32 frame;
  44. } gtp_info_t;
  45. @@ -2482,7 +2482,7 @@ static int decode_gtp_node_addr(tvbuff_t * tvb, int offset, packet_info * pinfo,
  46. static int decode_gtp_priv_ext(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree, session_args_t * args _U_);
  47. static int decode_gtp_unknown(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree, session_args_t * args _U_);
  48. -typedef struct _gtp_opt {
  49. +typedef struct {
  50. int optcode;
  51. int (*decode) (tvbuff_t *, int, packet_info *, proto_tree *, session_args_t *);
  52. } gtp_opt_t;
  53. @@ -2661,12 +2661,12 @@ id_to_str(tvbuff_t *tvb, gint offset)
  54. /* Next definitions and function check_field_presence checks if given field
  55. * in GTP packet is compliant with ETSI
  56. */
  57. -typedef struct _header {
  58. +typedef struct {
  59. guint8 code;
  60. guint8 presence;
  61. } ext_header;
  62. -typedef struct _message {
  63. +typedef struct {
  64. guint8 code;
  65. ext_header fields[32];
  66. } _gtp_mess_items;