summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/setserial
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/setserial')
-rw-r--r--meta/recipes-bsp/setserial/setserial/0001-setserial.c-Add-needed-system-headers-for-ioctl-and-.patch41
-rw-r--r--meta/recipes-bsp/setserial/setserial_2.17.bb7
2 files changed, 44 insertions, 4 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 @@
1From 9bbb342f5d9ad5dc75486fd35ada8e287ba19299 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 15 Aug 2022 13:03:17 -0700
4Subject: [PATCH] setserial.c: Add needed system headers for ioctl() and
5 close() calls
6
7Add int return type for main() function
8
9Fixes
10error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
11error: call to undeclared function 'close'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declarat
12ion]
13
14Upstream-Status: Submitted [https://sourceforge.net/p/setserial/discussion/7060/thread/95d874c12c/]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 setserial.c | 4 +++-
18 1 file changed, 3 insertions(+), 1 deletion(-)
19
20diff --git a/setserial.c b/setserial.c
21index 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;
diff --git a/meta/recipes-bsp/setserial/setserial_2.17.bb b/meta/recipes-bsp/setserial/setserial_2.17.bb
index 8dbddd7dc5..98ab45145f 100644
--- a/meta/recipes-bsp/setserial/setserial_2.17.bb
+++ b/meta/recipes-bsp/setserial/setserial_2.17.bb
@@ -1,12 +1,10 @@
1SUMMARY = "Controls the configuration of serial ports" 1SUMMARY = "Controls the configuration of serial ports"
2DESCRIPTION = "setserial is a program designed to set and/or report the configuration information associated with a serial port" 2DESCRIPTION = "setserial is a program designed to set and/or report the configuration information associated with a serial port"
3HOMEPAGE = "http://setserial.sourceforge.net" 3HOMEPAGE = "http://setserial.sourceforge.net"
4AUTHOR = "Theodore Ts'o <tytso@mit.edu>"
5SECTION = "console/utils" 4SECTION = "console/utils"
6 5
7LICENSE = "GPLv2.0" 6LICENSE = "GPL-2.0-only"
8LIC_FILES_CHKSUM = "file://version.h;beginline=1;endline=6;md5=2e7c59cb9e57e356ae81f50f4e4dfd99" 7LIC_FILES_CHKSUM = "file://version.h;beginline=1;endline=6;md5=2e7c59cb9e57e356ae81f50f4e4dfd99"
9PR = "r3"
10 8
11DEPENDS += "groff-native" 9DEPENDS += "groff-native"
12 10
@@ -15,7 +13,8 @@ inherit autotools-brokensep
15SRC_URI = "${SOURCEFORGE_MIRROR}/setserial/${BPN}-${PV}.tar.gz \ 13SRC_URI = "${SOURCEFORGE_MIRROR}/setserial/${BPN}-${PV}.tar.gz \
16 file://add_stdlib.patch \ 14 file://add_stdlib.patch \
17 file://ldflags.patch \ 15 file://ldflags.patch \
18 " 16 file://0001-setserial.c-Add-needed-system-headers-for-ioctl-and-.patch \
17 "
19 18
20SRC_URI[md5sum] = "c4867d72c41564318e0107745eb7a0f2" 19SRC_URI[md5sum] = "c4867d72c41564318e0107745eb7a0f2"
21SRC_URI[sha256sum] = "7e4487d320ac31558563424189435d396ddf77953bb23111a17a3d1487b5794a" 20SRC_URI[sha256sum] = "7e4487d320ac31558563424189435d396ddf77953bb23111a17a3d1487b5794a"