Commit bf60e445 authored by Ondřej Surý's avatar Ondřej Surý

Stop using AC_C_FLEXIBLE_ARRAY_MEMBER, support for it is part of C99

parent fe044267
Pipeline #42814 failed with stages
in 40 minutes and 8 seconds
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment