summaryrefslogtreecommitdiff
path: root/lib/fts_.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fts_.h')
-rw-r--r--lib/fts_.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/fts_.h b/lib/fts_.h
index 63d4b742..b9a3f12c 100644
--- a/lib/fts_.h
+++ b/lib/fts_.h
@@ -1,6 +1,6 @@
/* Traverse a file hierarchy.
- Copyright (C) 2004-2014 Free Software Foundation, Inc.
+ Copyright (C) 2004-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -51,7 +51,13 @@
# ifdef _LIBC
# include <features.h>
+# if __STDC_VERSION__ < 199901L
+# define __FLEXIBLE_ARRAY_MEMBER 1
+# else
+# define __FLEXIBLE_ARRAY_MEMBER
+# endif
# else
+# define __FLEXIBLE_ARRAY_MEMBER FLEXIBLE_ARRAY_MEMBER
# undef __THROW
# define __THROW
# undef __BEGIN_DECLS
@@ -243,7 +249,7 @@ typedef struct _ftsent {
unsigned short int fts_instr; /* fts_set() instructions */
struct stat fts_statp[1]; /* stat(2) information */
- char fts_name[1]; /* file name */
+ char fts_name[__FLEXIBLE_ARRAY_MEMBER]; /* file name */
} FTSENT;
#ifndef __GNUC_PREREQ