mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-22 14:49:45 -04:00
BUILD: quic: fix anonymous union for gcc-4.4
Building QUIC with gcc-4.4 on el6 shows this error:
src/xprt_quic.c: In function 'qc_release_lost_pkts':
src/xprt_quic.c:1905: error: unknown field 'loss' specified in initializer
compilation terminated due to -Wfatal-errors.
make: *** [src/xprt_quic.o] Error 1
make: *** Waiting for unfinished jobs....
Initializing an anonymous form of union like :
struct quic_cc_event ev = {
(...)
.loss.time_sent = newest_lost->time_sent,
(...)
};
generates an error with gcc-4.4 but not when initializing the
fields outside of the declaration.
This commit is contained in:
parent
dca4c53a95
commit
69e3f05b15
1 changed files with 4 additions and 4 deletions
|
|
@ -1900,10 +1900,10 @@ static inline void qc_release_lost_pkts(struct quic_conn *qc,
|
|||
|
||||
if (newest_lost) {
|
||||
/* Sent a congestion event to the controller */
|
||||
struct quic_cc_event ev = {
|
||||
.type = QUIC_CC_EVT_LOSS,
|
||||
.loss.time_sent = newest_lost->time_sent,
|
||||
};
|
||||
struct quic_cc_event ev = { };
|
||||
|
||||
ev.type = QUIC_CC_EVT_LOSS;
|
||||
ev.loss.time_sent = newest_lost->time_sent;
|
||||
|
||||
quic_cc_event(&qc->path->cc, &ev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue