This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
braces around scalar initializer for type
- From: Alexey Pavlov <alexpux at gmail dot com>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 12 Mar 2015 21:18:13 +0300
- Subject: braces around scalar initializer for type
- Authentication-results: sourceware.org; auth=none
Building MSYS2 runtime I'm get:
/build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/net.cc:82:56:
error: braces around scalar initializer for type 'u_char {aka unsigned
char}'
const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
^
/build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/net.cc:83:66:
error: braces around scalar initializer for type 'u_char {aka unsigned
char}'
const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};
^
/build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/../Makefile.common:43:
recipe for target 'net.o' failed
So I think next patch can be applied:
>From 9c11fcf2fc74601eb48e8060b6575b56be111a02 Mon Sep 17 00:00:00 2001
From: Alexpux <alexey.pawlow@gmail.com>
Date: Thu, 12 Mar 2015 14:33:39 +0300
Subject: [PATCH] Fix error "braces around scalar initializer for type"
---
winsup/cygwin/net.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index e06fd52..f9b317c 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -79,8 +79,8 @@ extern "C"
const unsigned char *);
} /* End of "C" section */
-const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
-const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};
+const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
static fhandler_socket *
get (const int fd)
--
2.3.0