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 | f3028a8da0a1fe5ca0291c9d899cc7191e9f5dd0 (patch) | |
tree | 43f7e0cb571f2472192bec8fe8f14bcb6ca71f5e | |
parent | 9e6b2eb9969f94e38789c2d6414795c681f26744 (diff) | |
download | openfirmware-f3028a8da0a1fe5ca0291c9d899cc7191e9f5dd0.tar.gz |
forth/wrapper: include sys/ioctl.h on UNIX
Fixes a build warning due to a missing prototype:
forth/wrapper/wrapper.c: In function ‘f_ioctl’:
forth/wrapper/wrapper.c:1968:15: warning: implicit declaration of
function ‘ioctl’ [-Wimplicit-function-declaration]
1968 | return((long)ioctl((int)fd, (int)code, buf));
| ^~~~~
-rw-r--r-- | forth/wrapper/wrapper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/forth/wrapper/wrapper.c b/forth/wrapper/wrapper.c index 18ccc760..31e73773 100644 --- a/forth/wrapper/wrapper.c +++ b/forth/wrapper/wrapper.c @@ -59,6 +59,9 @@ which is part of the Forth image file. #ifndef WIN32 #include <sys/mman.h> #endif +#ifdef __unix__ +#include <sys/ioctl.h> +#endif /* * The following #includes and externs fix GCC warnings when compiled with @@ -253,7 +256,6 @@ typedef long quadlet; #ifdef BSD # include <sys/time.h> -# include <sys/ioctl.h> /* For FIONREAD */ #endif #ifdef SYS5 |