lksctp-tools/bugfix-withsctp-and-configure.patch
2020-07-02 15:14:59 +08:00

73 lines
2.8 KiB
Diff

From 7c0ef4d441b3833e721df58f56e2cb8c81b34df4 Mon Sep 17 00:00:00 2001
From: Xin Long <lucien.xin@gmail.com>
Date: Thu, 16 Aug 2018 14:12:01 +0800
Subject: [PATCH] withsctp: use @PACKAGE_VERSION@ in withsctp.h
From 79e7e6e4304bdde2922fab4a446b7384e204440e Mon Sep 17 00:00:00 2001
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Fri, 21 Dec 2018 10:25:19 -0200
Subject: [PATCH] withsctp: to not reuse PACKAGE_VERSION as lib version
From 7de2bd7e769f10521e3d0c2cb42c6f6b9b505dd0 Mon Sep 17 00:00:00 2001
From: Xin Long <lucien.xin@gmail.com>
Date: Thu, 16 Aug 2018 14:12:30 +0800
Subject: [PATCH] configure.ac: add CURRENT REVISION and AGE for libsctp and
libwithsctp
diff -Naur a/configure.ac b/configure.ac
--- a/configure.ac 2020-07-01 17:01:04.432069782 +0800
+++ b/configure.ac 2020-07-01 17:05:52.942602240 +0800
@@ -14,6 +14,13 @@
dnl configure will fail ...)
AC_INIT([lksctp-tools], [1.0.18], [], [], [http://www.lksctp.org/])
+AC_SUBST(LIBSCTP_CURRENT, 1)
+AC_SUBST(LIBSCTP_REVISION, 18)
+AC_SUBST(LIBSCTP_AGE, 0)
+AC_SUBST(LIBWITHSCTP_CURRENT, 1)
+AC_SUBST(LIBWITHSCTP_REVISION, 18)
+AC_SUBST(LIBWITHSCTP_AGE, 0)
+
AC_CONFIG_AUX_DIR(bin)
AC_CONFIG_SRCDIR([src/apps/sctp_darn.c])
AC_CONFIG_HEADERS([config.h])
diff -Naur a/Makefile.rules b/Makefile.rules
--- a/Makefile.rules 2020-07-01 17:01:04.432069782 +0800
+++ b/Makefile.rules 2020-07-01 17:03:13.642308299 +0800
@@ -15,4 +15,7 @@
edit = @sed \
-e "s|\@bindir\@|$(bindir)|" \
-e "s|\@libdir\@|$(libdir)|" \
- -e "s|\@PACKAGE\@|$(PACKAGE)|"
+ -e "s|\@PACKAGE\@|$(PACKAGE)|" \
+ -e "s|\@LIBWITHSCTP_CURRENT\@|$(LIBWITHSCTP_CURRENT)|" \
+ -e "s|\@LIBWITHSCTP_REVISION\@|$(LIBWITHSCTP_REVISION)|" \
+ -e "s|\@LIBWITHSCTP_AGE\@|$(LIBWITHSCTP_AGE)|"
diff -Naur a/src/withsctp/Makefile.am b/src/withsctp/Makefile.am
--- a/src/withsctp/Makefile.am 2020-07-01 17:01:04.452069819 +0800
+++ b/src/withsctp/Makefile.am 2020-07-01 17:07:39.482798756 +0800
@@ -14,8 +14,8 @@
pkglib_LTLIBRARIES = libwithsctp.la
libwithsctp_la_SOURCES = sctp_load_libs.c sctp_socket.c sctp_bind.c \
sctp_sockopt.c sctp_socket.h
-libwithsctp_la_LDFLAGS = -version-info 1:17:0 -ldl
-
+bwithsctp_la_LDFLAGS = -version-info \
+ @LIBWITHSCTP_CURRENT@:@LIBWITHSCTP_REVISION@:@LIBWITHSCTP_AGE@ -ldl
pkgdoc_DATA = sctp_load_libs.c sctp_socket.c sctp_bind.c \
sctp_sockopt.c sctp_socket.h checksctp.c
diff -Naur a/src/withsctp/withsctp.in b/src/withsctp/withsctp.in
--- a/src/withsctp/withsctp.in 2020-07-01 17:01:04.452069819 +0800
+++ b/src/withsctp/withsctp.in 2020-07-01 17:04:52.962491581 +0800
@@ -2,7 +2,8 @@
# -*- sh -*-
LIBDIR=@libdir@/@PACKAGE@
BINDIR=@bindir@
-export LD_PRELOAD=${LIBDIR}/libwithsctp.so.1.0.17
+LIBVER=@LIBWITHSCTP_CURRENT@.@LIBWITHSCTP_AGE@.@LIBWITHSCTP_REVISION@
+export LD_PRELOAD=${LIBDIR}/libwithsctp.so.${LIBVER}
if ! ${BINDIR}/checksctp 2> /dev/null
then
${BINDIR}/checksctp;