GNU Mailutils - Bugs: bug #57787, Multiple definitions of global...
bug #57787: Multiple definitions of global variables break compilation with gcc-10 (or -fno-common)
Submitter: | None | ||
Submitted: | Tue 11 Feb 2020 09:18:53 AM UTC | ||
Category: | None | Severity: | 3 - Normal |
Item Group: | None | Status: | Fixed |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Closed |
Discussion locked!
Attached Files
file #48392: mailutils-fno-common.diff added by None (802B - text/x-patch - patch to fix compilation with gcc10/fno-common)
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2020-07-09 | gray | Status | None | Fixed | |
Open/Closed | Open | Closed | |||
Discussion Lock | None | Locked | |||
2020-02-11 | None | Attached File | - | Added mailutils-fno-common.diff, #48392 |
Powered by Savane 3.13-f8d8.
Corresponding source code
With gcc 10 the compiler will become stricter when it comes to global variable definitions. In the past it was "allowed" to define the same global variable in multiple files that are linked together. This will break in the future, the variable must be defined in one place and marked as extern in all others. (This stricter behavior can also be enforced in old gcc versions by passing the flag -fno-common.)
mu_tcp_wrapper_daemon is defined both in tcpwrap.c and tcpwrap.h (which subsequently gets included by other files). Marking it as extern in tcpwrap.h fixes this.
tls_available is defined in imap4d.h which gets included by multiple other files. It looks like this variable is only defined completely unused, so I think it can be just removed.
See patch attached.