diff options
author | Jeff Law <jeffreyalaw@gmail.com> | 2023-12-17 07:11:10 +0300 |
---|---|---|
committer | Jeff Law <jeffreyalaw@gmail.com> | 2023-12-17 07:11:10 +0300 |
commit | 57e311e0deb23492edc94518c78cc57a224dbad9 (patch) | |
tree | 801920acb58b96c5f351f1a85c112882affce851 /libgloss/moxie | |
parent | 17a6aff334a20f63cb7f428a36dad0c8ebbdab5d (diff) |
Re: Fix moxie libgloss issues with c99
Two libgloss issues specific to moxie-elf that show up build with GCC trunk.
First, putnum.c uses "print" without a prototype. So I added one based on the
function's definition in print.c. Second sim-inbyte.c uses read, which comes
from unistd.h, so this adds a suitable #include.
Diffstat (limited to 'libgloss/moxie')
-rw-r--r-- | libgloss/moxie/putnum.c | 2 | ||||
-rw-r--r-- | libgloss/moxie/sim-inbyte.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libgloss/moxie/putnum.c b/libgloss/moxie/putnum.c index 0f7e89453..9af5b4d4c 100644 --- a/libgloss/moxie/putnum.c +++ b/libgloss/moxie/putnum.c @@ -14,6 +14,8 @@ */ #include "glue.h" +void print (char *); + /* * putnum -- print a 32 bit number in hex */ diff --git a/libgloss/moxie/sim-inbyte.c b/libgloss/moxie/sim-inbyte.c index 1e7466a8d..4cda6604a 100644 --- a/libgloss/moxie/sim-inbyte.c +++ b/libgloss/moxie/sim-inbyte.c @@ -14,6 +14,10 @@ * they apply. */ +#include <stdlib.h> + +#include <unistd.h> + int inbyte () { |