summaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2013-04-20 12:12:35 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2013-04-23 10:31:03 +0200
commit7ed3f4e859896fbb8d384a4f101e40df47eb0ef0 (patch)
treebfac67f0b6cb408a3adb88d57a59922ace70102d /nss
parent5c95f7b66be2e59cf26f3c29cfab7657880bd76d (diff)
downloadglibc-7ed3f4e859896fbb8d384a4f101e40df47eb0ef0.tar.gz
Remove non-standard initialisation of flexible array member
This avoids GCC bug 28865.
Diffstat (limited to 'nss')
-rw-r--r--nss/nss_files/files-init.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/nss/nss_files/files-init.c b/nss/nss_files/files-init.c
index 8aac3fb08c..a34c49a99f 100644
--- a/nss/nss_files/files-init.c
+++ b/nss/nss_files/files-init.c
@@ -18,6 +18,7 @@
#ifdef USE_NSCD
+#include <string.h>
#include <nscd/nscd.h>
@@ -30,7 +31,7 @@ static union \
{ \
.file = \
{ \
- .fname = filename, ## __VA_ARGS__ \
+ __VA_ARGS__ \
} \
}
@@ -45,16 +46,22 @@ TF (netgr, "/etc/netgroup");
void
_nss_files_init (void (*cb) (size_t, struct traced_file *))
{
+ strcpy (pwd_traced_file.file.fname, "/etc/passwd");
cb (pwddb, &pwd_traced_file.file);
+ strcpy (grp_traced_file.file.fname, "/etc/group");
cb (grpdb, &grp_traced_file.file);
+ strcpy (hst_traced_file.file.fname, "/etc/hosts");
cb (hstdb, &hst_traced_file.file);
+ strcpy (resolv_traced_file.file.fname, "/etc/resolv.conf");
cb (hstdb, &resolv_traced_file.file);
+ strcpy (serv_traced_file.file.fname, "/etc/services");
cb (servdb, &serv_traced_file.file);
+ strcpy (netgr_traced_file.file.fname, "/etc/netgroup");
cb (netgrdb, &netgr_traced_file.file);
}