Florian Weimer 2023-04-13 11:06:10 +02:00
parent 3997ae0a40
commit d5842efee3
3 changed files with 53 additions and 1 deletions

28
setserial-c99.patch Normal file
View File

@ -0,0 +1,28 @@
Avoid implicit int and implicit function declarations.
A mostly equivalent patch has been posted upstream:
<https://sourceforge.net/p/setserial/discussion/7060/thread/95d874c12c/?limit=25#1643>
diff --git a/setserial.c b/setserial.c
index f184e98db07ceb59..d181327fc568ede4 100644
--- a/setserial.c
+++ b/setserial.c
@@ -15,6 +15,9 @@
#include <termios.h>
#include <string.h>
#include <errno.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+#include <stdlib.h>
#ifdef HAVE_ASM_IOCTLS_H
#include <asm/ioctls.h>
@@ -714,6 +717,7 @@ fprintf(stderr, "\t* port\t\tset the I/O port\n");
exit(1);
}
+int
main(int argc, char **argv)
{
int get_flag = 0, wild_intr_flag = 0;

View File

@ -0,0 +1,17 @@
This fixes a generic C99 compatibility issue in autoconf-generated
code. No need to upstream this because the issue goes away if
autoconf is re-run.
diff --git a/configure b/configure
index 9d6084aa38e5d6e8..4d948816e1112d13 100755
--- a/configure
+++ b/configure
@@ -689,7 +689,7 @@ cat > conftest.$ac_ext << EOF
#line 690 "configure"
#include "confdefs.h"
-main(){return(0);}
+int main(){return(0);}
EOF
if { (eval echo configure:695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes

View File

@ -3,7 +3,7 @@
Summary: A utility for configuring serial ports
Name: setserial
Version: 2.17
Release: 56%{?dist}
Release: 57%{?dist}
Source: https://sourceforge.net/projects/setserial/files/setserial/%{version}/%{name}-%{version}.tar.gz
Patch0: setserial-2.17-fhs.patch
Patch1: setserial-2.17-rc.patch
@ -11,6 +11,8 @@ Patch2: setserial-2.17-readme.patch
Patch3: setserial-2.17-spelling.patch
Patch4: setserial-hayesesp.patch
Patch5: setserial-aarch64.patch
Patch6: setserial-configure-c99.patch
Patch7: setserial-c99.patch
License: GPL+
URL: http://setserial.sourceforge.net/
ExcludeArch: s390 s390x
@ -44,6 +46,8 @@ rm -f config.cache
# Support aarch64 (bug #926522).
%patch5 -p1 -b .aarch64
%patch6 -p1
%patch7 -p1
%build
%set_build_flags
@ -64,6 +68,9 @@ make install DESTDIR=${RPM_BUILD_ROOT}
%{_mandir}/man*/*
%changelog
* Thu Apr 13 2023 Florian Weimer <fweimer@redhat.com> - 2.17-57
- Port to C99
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.17-56
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild