[PATCH 3/6] inet: annotate tu_data and tu_stuff with __decl_is_flex_array
Cristian Rodríguez
cristian@rodriguez.im
Mon Jul 10 15:04:39 GMT 2023
Signed-off-by: Cristian Rodríguez <cristian@rodriguez.im>
---
inet/arpa/tftp.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/inet/arpa/tftp.h b/inet/arpa/tftp.h
index 86e0b6e814..43d1c30fe2 100644
--- a/inet/arpa/tftp.h
+++ b/inet/arpa/tftp.h
@@ -32,6 +32,8 @@
#ifndef _ARPA_TFTP_H
#define _ARPA_TFTP_H 1
+#include <features.h>
+
/*
* Trivial File Transfer Protocol (IEN-133)
*/
@@ -55,9 +57,9 @@ struct tftphdr {
unsigned short tu_block; /* block # */
short tu_code; /* error code */
} __attribute__ ((__packed__)) th_u3;
- char tu_data[0]; /* data or error string */
+ char tu_data[0] __decl_is_flex_array; /* data or error string */
} __attribute__ ((__packed__)) th_u2;
- char tu_stuff[0]; /* request packet stuff */
+ char tu_stuff[0] __decl_is_flex_array; /* request packet stuff */
} __attribute__ ((__packed__)) th_u1;
} __attribute__ ((__packed__));
--
2.41.0
More information about the Libc-alpha
mailing list