commit 23472118791dc8686c32e74ec5aa6efca5178bc2
Author: Jan Rękorajski <[email protected]>
Date:   Sun Apr 26 17:30:08 2020 +0200

    - build fixes for modern gcc and glibc
    - rel 3

 array-bounds.patch | 31 +++++++++++++++++++++++
 const-const.patch  | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 mISDNuser.spec     | 17 ++++++++-----
 3 files changed, 116 insertions(+), 6 deletions(-)
---
diff --git a/mISDNuser.spec b/mISDNuser.spec
index 46710a7..61bf046 100644
--- a/mISDNuser.spec
+++ b/mISDNuser.spec
@@ -8,7 +8,7 @@ Summary:        Userspace part of Modular ISDN stack
 Summary(pl.UTF-8):     Część stosu modularnego ISDN (mISDN) dla przestrzeni 
użytkownika
 Name:          mISDNuser
 Version:       2.0.19
-Release:       2
+Release:       3
 License:       LGPL v2.1
 Group:         Libraries
 # git clone git://git.misdn.eu/mISDNuser.git
@@ -17,6 +17,8 @@ Source0:      %{name}-%{version}.tar.xz
 # Source0-md5: fb4bf6c110bea0a30486015ca56e80d8
 Patch0:                git.patch
 Patch1:                x32.patch
+Patch2:                const-const.patch
+Patch3:                array-bounds.patch
 URL:           http://www.isdn4linux.de/mISDN/
 BuildRequires: autoconf >= 2.63
 BuildRequires: automake
@@ -117,8 +119,11 @@ Aplikacja z graficznym interfejsem użytkownika do mISDN.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
+export CFLAGS="%{rpmcflags} -Wno-stringop-truncation"
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
@@ -134,7 +139,6 @@ Aplikacja z graficznym interfejsem użytkownika do mISDN.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/var/run/mISDNcapid
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -143,15 +147,16 @@ install -d $RPM_BUILD_ROOT/var/run/mISDNcapid
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/capi/lib*.la
 # sample
 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/capi20.conf
-%endif
-
-install -d $RPM_BUILD_ROOT/lib
-%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/udev $RPM_BUILD_ROOT/lib
 
+install -d $RPM_BUILD_ROOT/var/run/mISDNcapid
 install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
 cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/mISDNcapid.conf <<EOF
 d /var/run/mISDNcapid 755 root root -
 EOF
+%endif
+
+install -d $RPM_BUILD_ROOT/lib
+%{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/udev $RPM_BUILD_ROOT/lib
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/array-bounds.patch b/array-bounds.patch
new file mode 100644
index 0000000..1988066
--- /dev/null
+++ b/array-bounds.patch
@@ -0,0 +1,31 @@
+--- mISDNuser-2.0.19/lib/layer3/q931.c~        2014-10-20 14:18:55.000000000 
+0200
++++ mISDNuser-2.0.19/lib/layer3/q931.c 2020-04-26 17:16:23.169108417 +0200
+@@ -506,7 +506,7 @@
+ int
+ mi_encode_redirecting_nr(struct l3_msg *l3m, char *nr, int pres, unsigned int 
type, unsigned int plan, int reason)
+ {
+-      unsigned char ie[24];
++      unsigned char ie[32];
+       int l;
+ 
+       if (nr == NULL || *nr == 0) /* not provided */
+@@ -537,7 +537,7 @@
+ int
+ mi_encode_redirection_nr(struct l3_msg *l3m, char *nr, int pres, unsigned int 
type, unsigned int plan)
+ {
+-      unsigned char ie[24];
++      unsigned char ie[32];
+       int l;
+ 
+       if (nr == NULL || *nr == 0) /* not provided */
+--- mISDNuser-2.0.19/bridge/bridge.c.orig      2014-10-20 14:18:55.000000000 
+0200
++++ mISDNuser-2.0.19/bridge/bridge.c   2020-04-26 17:27:38.799085748 +0200
+@@ -147,7 +147,7 @@
+  */
+ static void ph_control(int sock, int c1, int c2)
+ {
+-      unsigned char data[MISDN_HEADER_LEN+sizeof(int)+sizeof(int)];
++      unsigned char data[MISDN_HEADER_LEN+sizeof(unsigned long)*2];
+       struct mISDNhead *hh = (struct mISDNhead *)data;
+       int len;
+       unsigned long *d = (unsigned long *)(data + MISDN_HEADER_LEN);
diff --git a/const-const.patch b/const-const.patch
new file mode 100644
index 0000000..4338259
--- /dev/null
+++ b/const-const.patch
@@ -0,0 +1,74 @@
+--- mISDNuser-2.0.19/lib/suppserv/diversion.c~ 2014-10-20 14:18:55.000000000 
+0200
++++ mISDNuser-2.0.19/lib/suppserv/diversion.c  2020-04-26 17:14:37.549111926 
+0200
+@@ -784,7 +784,7 @@
+  * \retval length on success.
+  * \retval -1 on error.
+  */
+-int encodeFacInterrogationDiversion(__u8 * Dest, const const struct asn1_parm 
*pc, const struct FacInterrogationDiversion *InterrogationDiversion)
++int encodeFacInterrogationDiversion(__u8 * Dest, const struct asn1_parm *pc, 
const struct FacInterrogationDiversion *InterrogationDiversion)
+ {
+       int Length;
+       __u8 *p;
+@@ -893,7 +893,7 @@
+  * \retval length on success.
+  * \retval -1 on error.
+  */
+-int encodeFacDiversionInformation(__u8 * Dest, const const struct asn1_parm 
*pc, const struct FacDiversionInformation *DiversionInformation)
++int encodeFacDiversionInformation(__u8 * Dest, const struct asn1_parm *pc, 
const struct FacDiversionInformation *DiversionInformation)
+ {
+       int Length;
+       __u8 *p;
+@@ -1052,7 +1052,7 @@
+  * \retval length on success.
+  * \retval -1 on error.
+  */
+-int encodeFacCallDeflection(__u8 * Dest, const const struct asn1_parm *pc, 
const struct FacCallDeflection *CallDeflection)
++int encodeFacCallDeflection(__u8 * Dest, const struct asn1_parm *pc, const 
struct FacCallDeflection *CallDeflection)
+ {
+       int Length;
+       __u8 *p;
+@@ -1142,7 +1142,7 @@
+  * \retval length on success.
+  * \retval -1 on error.
+  */
+-int encodeFacCallRerouteing(__u8 * Dest, const const struct asn1_parm *pc, 
const struct FacCallRerouteing *CallRerouteing)
++int encodeFacCallRerouteing(__u8 * Dest, const struct asn1_parm *pc, const 
struct FacCallRerouteing *CallRerouteing)
+ {
+       int Length;
+       __u8 *p;
+@@ -1284,7 +1284,7 @@
+  * \retval length on success.
+  * \retval -1 on error.
+  */
+-int encodeFacInterrogateServedUserNumbers(__u8 * Dest, const const struct 
asn1_parm *pc, const struct FacServedUserNumberList 
*InterrogateServedUserNumbers)
++int encodeFacInterrogateServedUserNumbers(__u8 * Dest, const struct asn1_parm 
*pc, const struct FacServedUserNumberList *InterrogateServedUserNumbers)
+ {
+       int Length;
+       __u8 *p;
+@@ -1353,7 +1353,7 @@
+  * \retval length on success.
+  * \retval -1 on error.
+  */
+-int encodeFacDivertingLegInformation1(__u8 * Dest, const const struct 
asn1_parm *pc, const struct FacDivertingLegInformation1 
*DivertingLegInformation1)
++int encodeFacDivertingLegInformation1(__u8 * Dest, const struct asn1_parm 
*pc, const struct FacDivertingLegInformation1 *DivertingLegInformation1)
+ {
+       int Length;
+       __u8 *p;
+@@ -1422,7 +1422,7 @@
+  * \retval length on success.
+  * \retval -1 on error.
+  */
+-int encodeFacDivertingLegInformation2(__u8 * Dest, const const struct 
asn1_parm *pc, const struct FacDivertingLegInformation2 
*DivertingLegInformation2)
++int encodeFacDivertingLegInformation2(__u8 * Dest, const struct asn1_parm 
*pc, const struct FacDivertingLegInformation2 *DivertingLegInformation2)
+ {
+       int Length;
+       __u8 *p;
+@@ -1524,7 +1524,7 @@
+  * \retval length on success.
+  * \retval -1 on error.
+  */
+-int encodeFacDivertingLegInformation3(__u8 * Dest, const const struct 
asn1_parm *pc, const struct FacDivertingLegInformation3 
*DivertingLegInformation3)
++int encodeFacDivertingLegInformation3(__u8 * Dest, const struct asn1_parm 
*pc, const struct FacDivertingLegInformation3 *DivertingLegInformation3)
+ {
+       int Length;
+       __u8 *p;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mISDNuser.git/commitdiff/23472118791dc8686c32e74ec5aa6efca5178bc2

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to