diff --git a/config.h.win32 b/config.h.win32 index 44ebffec15..52c53ffc70 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -375,17 +375,6 @@ typedef __int64 off_t; @HAVE_KRB5_H@ @HAVE_KRB5_KRB5_H@ -/* - * Define to nothing if C supports flexible array members, and to 1 if it does - * not. That way, with a declaration like `struct s { int n; double - * d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - * compilers. When computing the size of such an object, don't use 'sizeof - * (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' - * instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with - * MSVC and with C++ compilers. - */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - /* Avoid warnings with strlen() */ #ifdef _WIN64 #define strlen(x) (unsigned int) strlen(x) diff --git a/configure.ac b/configure.ac index 2a5a9b4c51..a1787adf66 100644 --- a/configure.ac +++ b/configure.ac @@ -328,7 +328,6 @@ AX_TLS([AS_IF([test "$ac_cv_tls" != "thread_local"], AC_C_CONST AC_C_INLINE AC_C_VOLATILE -AC_C_FLEXIBLE_ARRAY_MEMBER # # Check for yield support on ARM processors diff --git a/lib/dns/client.c b/lib/dns/client.c index 7a68623ca2..a86a5da468 100644 --- a/lib/dns/client.c +++ b/lib/dns/client.c @@ -3061,7 +3061,7 @@ typedef struct { dns_rdata_t rdata; size_t size; isc_mem_t *mctx; - unsigned char data[FLEXIBLE_ARRAY_MEMBER]; + unsigned char data[]; } dns_client_updaterec_t; isc_result_t diff --git a/lib/isc/ht.c b/lib/isc/ht.c index b3c9e5100d..7bda1cf662 100644 --- a/lib/isc/ht.c +++ b/lib/isc/ht.c @@ -29,7 +29,7 @@ struct isc_ht_node { void *value; isc_ht_node_t *next; size_t keysize; - unsigned char key[FLEXIBLE_ARRAY_MEMBER]; + unsigned char key[]; }; struct isc_ht {