diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2020-03-05 16:56:19 +0100 |
---|---|---|
committer | James Cameron <quozl@laptop.org> | 2020-03-12 14:17:55 +1100 |
commit | e607f82b1d6bd8b0b6be5741e66285024c5b273a (patch) | |
tree | 94f37acf4bbda6c765eaf9f3746c9ddf14b77cd0 | |
parent | f3028a8da0a1fe5ca0291c9d899cc7191e9f5dd0 (diff) | |
download | openfirmware-e607f82b1d6bd8b0b6be5741e66285024c5b273a.tar.gz |
forth/wrapper: include time.h
Fixes build warnings due to missing prototypes:
forth/wrapper/wrapper.c: In function ‘today’:
forth/wrapper/wrapper.c:2145:2: warning: implicit declaration of function
‘time’; did you mean ‘ftime’? [-Wimplicit-function-declaration]
2145 | time(&tadd);
| ^~~~
| ftime
forth/wrapper/wrapper.c:2146:15: warning: implicit declaration of
function ‘localtime’ [-Wimplicit-function-declaration]
2146 | return((long)localtime(&tadd));
| ^~~~~~~~~
-rw-r--r-- | forth/wrapper/wrapper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/forth/wrapper/wrapper.c b/forth/wrapper/wrapper.c index 31e73773..87ceb570 100644 --- a/forth/wrapper/wrapper.c +++ b/forth/wrapper/wrapper.c @@ -2134,6 +2134,9 @@ c_getenv(char *str) return((long)getenv(str)); } +#ifdef __linux__ +#include <time.h> +#endif #ifdef SYS5 #include <sys/time.h> #ifndef IRIS |