shithub: drawterm

Download patch

ref: d4043e96060df9abaab72c2acee4a548f43dba4e
parent: bf3a3cdf187ea5a99386a2848a468cd2e79c3e43
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Apr 27 17:19:37 EDT 2020

fix drawterm compiles using gcc 10

-fno-common became the default, and and kmesg was relying
on common symbols being merged.

--- a/kern/dat.h	Thu Apr 23 15:52:37 2020
+++ b/kern/dat.h	Mon Apr 27 17:19:37 2020
@@ -32,6 +32,7 @@
 typedef struct RWlock	RWlock;
 typedef struct Waitq	Waitq;
 typedef struct Walkqid	Walkqid;
+typedef struct Kmesg	Kmesg;
 typedef int    Devgen(Chan*, char*, Dirtab*, int, int, Dir*);
 
 #include "fcall.h"
@@ -477,8 +478,10 @@
  * Log console output so it can be retrieved via /dev/kmesg.
  * This is good for catching boot-time messages after the fact.
  */
-struct {
+struct Kmesg {
 	Lock lk;
 	uint n;
 	char buf[16384];
-} kmesg;
+};
+
+extern Kmesg kmesg;
--- a/kern/devcons.c	Thu Apr 23 15:52:37 2020
+++ b/kern/devcons.c	Mon Apr 27 17:19:37 2020
@@ -13,6 +13,7 @@
 
 void	(*screenputs)(char*, int) = 0;
 
+Kmesg	kmesg;			/* console messages */
 Queue*	kbdq;			/* unprocessed console input */
 Queue*	lineq;			/* processed console input */
 Queue*	kprintoq;		/* console output, for /dev/kprint */