Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] unnamed structs - epan/dissectors/packet-ieee802154.h

From: Andrew Hood <ajhood@xxxxxxxxx>
Date: Fri, 21 Mar 2008 15:01:47 +1100
Is there any way to make use of unnamed structs a compilation error?


-- 
There's no point in being grown up if you can't be childish sometimes.
                -- Dr. Who
Index: epan/dissectors/packet-ieee802154.h
===================================================================
--- epan/dissectors/packet-ieee802154.h	(revision 24705)
+++ epan/dissectors/packet-ieee802154.h	(working copy)
@@ -143,14 +143,18 @@
     union {
         guint16 dst_addr16;
         guint64 dst_addr64;
-    };
+    } dst_addr ;
     guint16     src_pan;
     union {
         guint16 src_addr16;
         guint64 src_addr64;
-    };
+    } src_addr;
 } ieee802154_packet;
 
+#define dst_addr16 dst_addr.dst_addr16
+#define dst_addr64 dst_addr.dst_addr64
+#define src_addr16 src_addr.src_addr16
+#define src_addr64 src_addr.src_addr64
 
 /* Some Helper Function Definitions. */
 extern guint    get_by_mask(guint, guint);