]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
arm/term: Fix linking error due multiple ps2_state definitions
authorJavier Martinez Canillas <javierm@redhat.com>
Thu, 3 Dec 2020 15:01:44 +0000 (16:01 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 11 Dec 2020 12:53:54 +0000 (13:53 +0100)
When building with --target=arm-linux-gnu --with-platform=coreboot
a linking error occurs caused by multiple definitions of the
ps2_state variable.

Mark them as static since they aren't used outside their compilation unit.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/term/arm/cros.c
grub-core/term/arm/pl050.c

index 1ff9f8ccfb8270884ba962a05ca99df4c6ed1f41..a17e49c325c75bc311ffeeb8aee9ca49b10a7838 100644 (file)
@@ -30,7 +30,7 @@
 #include <grub/fdtbus.h>
 #include <grub/arm/cros_ec.h>
 
-struct grub_ps2_state ps2_state;
+static struct grub_ps2_state ps2_state;
 
 struct grub_cros_ec_keyscan old_scan;
 
index e4cda305666df20eba26e10d74b879361e83d6ea..b082243b03269ab4288f11ca0c14abab51ec3f2d 100644 (file)
@@ -29,7 +29,7 @@
 
 static volatile grub_uint32_t *pl050_regs;
 
-struct grub_ps2_state ps2_state;
+static struct grub_ps2_state ps2_state;
 
 static void
 keyboard_controller_wait_until_ready (void)