From: Andreas Beckmann Date: Sat, 22 Aug 2020 20:31:43 +0000 (+0100) Subject: fix FTBFS with gcc-10 X-Git-Tag: archive/raspbian/3.2.1-26+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8bf1de5d18766ca88a0ec6afd414b3a8711df281;p=bumblebee.git fix FTBFS with gcc-10 Bug-Debian: https://bugs.debian.org/957058 gcc-10 defaults to -fno-common see https://gcc.gnu.org/gcc-10/porting_to.html Gbp-Pq: Name gcc-10.patch --- diff --git a/src/bbconfig.h b/src/bbconfig.h index 13c9517..2a38d5b 100644 --- a/src/bbconfig.h +++ b/src/bbconfig.h @@ -103,7 +103,7 @@ enum bb_pm_method { PM_VGASWITCHEROO, PM_METHODS_COUNT /* not a method but a marker for the end */ }; -const char *bb_pm_method_string[PM_METHODS_COUNT]; +extern const char *bb_pm_method_string[PM_METHODS_COUNT]; /* String buffer size */ #define BUFFER_SIZE 1024 diff --git a/src/bbsecondary.c b/src/bbsecondary.c index c88d91b..14d5104 100644 --- a/src/bbsecondary.c +++ b/src/bbsecondary.c @@ -37,6 +37,9 @@ #include "pci.h" #include "module.h" +/* PCI Bus ID of the discrete video card */ +struct pci_bus_id *pci_bus_id_discrete; + /** * Substitutes DRIVER in the passed path * @param x_conf_file A path to be processed diff --git a/src/bbsecondary.h b/src/bbsecondary.h index ba6e884..7b5628e 100644 --- a/src/bbsecondary.h +++ b/src/bbsecondary.h @@ -21,7 +21,7 @@ #pragma once /* PCI Bus ID of the discrete video card */ -struct pci_bus_id *pci_bus_id_discrete; +extern struct pci_bus_id *pci_bus_id_discrete; /// Start the X server by fork-exec, turn card on if needed. bool start_secondary(bool); diff --git a/src/switch/switching.c b/src/switch/switching.c index 7ed716e..4872122 100644 --- a/src/switch/switching.c +++ b/src/switch/switching.c @@ -31,6 +31,8 @@ struct switching_method switching_methods[SWITCHERS_COUNT] = { switcheroo_on, switcheroo_off} }; +struct switching_method *switcher = NULL; + /** * Enumerates through available switching methods and try a method * diff --git a/src/switch/switching.h b/src/switch/switching.h index e0a54bc..4e7b03a 100644 --- a/src/switch/switching.h +++ b/src/switch/switching.h @@ -60,10 +60,10 @@ void switcheroo_off(void); /* number of switchers as defined in switching.c */ #define SWITCHERS_COUNT 2 -struct switching_method switching_methods[SWITCHERS_COUNT]; +extern struct switching_method switching_methods[SWITCHERS_COUNT]; /* A switching method that can be used or NULL if none */ -struct switching_method *switcher; +extern struct switching_method *switcher; struct switching_method *switcher_detect(const char *name, struct switch_info); enum switch_state switch_status(void);