]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUILD] fix build of global section with older gcc versions
authorWilly Tarreau <w@1wt.eu>
Thu, 18 Oct 2007 13:15:57 +0000 (15:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Oct 2007 13:15:57 +0000 (15:15 +0200)
The way the global section was initialized was not correct, which
made older versions of GCC complain.

src/haproxy.c

index c57e23f89fd9c9e7481b37c144e501504ad19a7e..cc2514b265e640018fb34b7b01148faec1bfd1e7 100644 (file)
@@ -117,11 +117,17 @@ struct global global = {
        loglev1 : 7, /* max syslog level : debug */
        loglev2 : 7,
        .stats_timeout = { .tv_sec = 10, .tv_usec = 0 }, /* stats timeout = 10 seconds */
-       .stats_sock.timeout = &global.stats_timeout,
-       .stats_sock.maxconn = 10, /* 10 concurrent stats connections */
-       .stats_sock.perm.ux.uid = -1,
-       .stats_sock.perm.ux.gid = -1,
-       .stats_sock.perm.ux.mode = 0,
+       .stats_sock = {
+               .timeout = &global.stats_timeout,
+               .maxconn = 10, /* 10 concurrent stats connections */
+               .perm = {
+                        .ux = {
+                                .uid = -1,
+                                .gid = -1,
+                                .mode = 0,
+                        }
+                }
+       }
        /* others NULL OK */
 };