aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-12-13 05:38:57 +0800
committerH.J. Lu <hjl.tools@gmail.com>2024-12-14 19:26:45 +0800
commit8aa2a9e0339215012354f3c4a262edda838134e8 (patch)
tree0c9e59246bcaf26bfb76478ca92cc12e9b43f8a0 /sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c
parent1d40170dd367831b97cbdb89ad1b7241a241923b (diff)
downloadglibc-8aa2a9e0339215012354f3c4a262edda838134e8.zip
glibc-8aa2a9e0339215012354f3c4a262edda838134e8.tar.gz
glibc-8aa2a9e0339215012354f3c4a262edda838134e8.tar.bz2
Add braces in initializers for GCC 4.9 or older
Add braces to silence GCC 4.9 or older: getaddrinfo.c: In function ‘gaih_inet’: getaddrinfo.c:1135:24: error: missing braces around initializer [-Werror=missing-braces] / sizeof (struct gaih_typeproto)] = {0}; ^ Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c')
-rw-r--r--sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c b/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c
index 55362f6..a024783 100644
--- a/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c
+++ b/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c
@@ -59,7 +59,7 @@ send_fd (const int sock, const int fd)
{
struct cmsghdr hdr;
char buf[CMSG_SPACE (sizeof (int))];
- } cmsgbuf = {0};
+ } cmsgbuf = {{0}};
struct cmsghdr *cmsg;
struct iovec vec;
char ch = 'A';
@@ -92,7 +92,7 @@ recv_fd (const int sock)
{
struct cmsghdr hdr;
char buf[CMSG_SPACE(sizeof(int))];
- } cmsgbuf = {0};
+ } cmsgbuf = {{0}};
struct cmsghdr *cmsg;
struct iovec vec;
ssize_t n;