diff options
Diffstat (limited to 'meta/recipes-bsp/setserial/setserial/0001-setserial.c-Add-needed-system-headers-for-ioctl-and-.patch')
-rw-r--r-- | meta/recipes-bsp/setserial/setserial/0001-setserial.c-Add-needed-system-headers-for-ioctl-and-.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-bsp/setserial/setserial/0001-setserial.c-Add-needed-system-headers-for-ioctl-and-.patch b/meta/recipes-bsp/setserial/setserial/0001-setserial.c-Add-needed-system-headers-for-ioctl-and-.patch new file mode 100644 index 0000000000..10c6ae881b --- /dev/null +++ b/meta/recipes-bsp/setserial/setserial/0001-setserial.c-Add-needed-system-headers-for-ioctl-and-.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 9bbb342f5d9ad5dc75486fd35ada8e287ba19299 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 15 Aug 2022 13:03:17 -0700 | ||
4 | Subject: [PATCH] setserial.c: Add needed system headers for ioctl() and | ||
5 | close() calls | ||
6 | |||
7 | Add int return type for main() function | ||
8 | |||
9 | Fixes | ||
10 | error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] | ||
11 | error: call to undeclared function 'close'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declarat | ||
12 | ion] | ||
13 | |||
14 | Upstream-Status: Submitted [https://sourceforge.net/p/setserial/discussion/7060/thread/95d874c12c/] | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | setserial.c | 4 +++- | ||
18 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/setserial.c b/setserial.c | ||
21 | index bfda8fd..6a95513 100644 | ||
22 | --- a/setserial.c | ||
23 | +++ b/setserial.c | ||
24 | @@ -16,6 +16,8 @@ | ||
25 | #include <termios.h> | ||
26 | #include <string.h> | ||
27 | #include <errno.h> | ||
28 | +#include <unistd.h> | ||
29 | +#include <sys/ioctl.h> | ||
30 | |||
31 | #ifdef HAVE_ASM_IOCTLS_H | ||
32 | #include <asm/ioctls.h> | ||
33 | @@ -715,7 +717,7 @@ fprintf(stderr, "\t* port\t\tset the I/O port\n"); | ||
34 | exit(1); | ||
35 | } | ||
36 | |||
37 | -main(int argc, char **argv) | ||
38 | +int main(int argc, char **argv) | ||
39 | { | ||
40 | int get_flag = 0, wild_intr_flag = 0; | ||
41 | int c; | ||