Fix to compile with GCC v10
Bug #1860756 reported by
Tilmann Bubeck
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
FoxtrotGPS |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
use "static" before dialog10 to fix this problem with gcc 10:
https:/
"Default to -fno-common
A common mistake in C is omitting extern when declaring a global variable in a header file. If the header is included by several files it results in multiple definitions of the same variable. In previous GCC versions this error is ignored. GCC 10 defaults to -fno-common, which means a linker error will now be reported. To fix this, use extern in header files when declaring global variables, and ensure each global is defined in exactly one C file. As a workaround, legacy C code can be compiled with -fcommon.
To post a comment you must log in.
Thanks for the patch.
Could you indicate how you want your commit attributed in the commit
log? Normally we use a name and email address. You don't seem to have a
public email address listed on Launchpad. Is there an email address you
would like to use for this? Please note it will be exposed publicly. As
an alternative I can use either your Launchpad login or a link to your
Launchpad user page or just leave out the email address.
I suggest that we use this commit message for the change, does that
seem acceptable to you?
Convert dialog10 variables to static variables
This fixes a build failure with the GCC 10 linker,
which requires all variables to either be static
or unique within a single linking unit.
See-also: https:/ /gcc.gnu. org/gcc- 10/porting_ to.html# common
--
bye,
pabs
https:/ /wiki.debian. org/PaulWise