]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Unix: fix compilation with GCC 10
authorVincent Bernat <vincent@bernat.ch>
Mon, 28 Sep 2020 14:30:56 +0000 (16:30 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Mon, 28 Sep 2020 14:30:56 +0000 (16:30 +0200)
GCC 10 will now error when declaring a global variable twice:

  https://gcc.gnu.org/gcc-10/porting_to.html#common

Fix this issue by declaring the variable as `extern' in `krt.h'.
The variable is really declared in `krt.c'.

sysdep/unix/krt.h

index d4a8717e38ec9ce451ff58a489d92b256d9253ca..fe79efc3717d69a0f3e45ef8866e23a67d06eef2 100644 (file)
@@ -112,7 +112,7 @@ struct kif_proto {
   struct kif_state sys;                /* Sysdep state */
 };
 
-struct kif_proto *kif_proto;
+extern struct kif_proto *kif_proto;
 
 #define KIF_CF ((struct kif_config *)p->p.cf)