[riot-notifications] [RIOT-OS/RIOT] WIP net/sock dns: make header payload pointer c++ compliant (#11302)

Kaspar Schleiser notifications at github.com
Fri Sep 27 13:33:36 CEST 2019


kaspar030 commented on this pull request.



>  } sock_dns_hdr_t;
 
+#ifndef __cplusplus
+/**
+ * @brief   DNS internal structure with payload
+ * @extends sock_dns_hdr_t
+ * @details Auxiliary struct that contains a zero-length array as convenience
+ *          pointer to the payload. Only for use in C, invalid in ISO-C++.
+ */
+typedef struct {
+    uint16_t id;        /**< read           */
+    uint16_t flags;     /**< DNS            */
+    uint16_t qdcount;   /**< RFC            */
+    uint16_t ancount;   /**< for            */
+    uint16_t nscount;   /**< detailed       */
+    uint16_t arcount;   /**< explanations   */
+    uint8_t  payload[]; /**< !!             */

could just this field be guarded by "__cplusplus"?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11302#pullrequestreview-294267756
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190927/465b4117/attachment.htm>


More information about the notifications mailing list