Blame SOURCES/lksctp-tools-1.0.18-withsctp-use-PACKAGE_VERSION-in-withsctp.h.patch

74a398
From 7c0ef4d441b3833e721df58f56e2cb8c81b34df4 Mon Sep 17 00:00:00 2001
74a398
From: Xin Long <lucien.xin@gmail.com>
74a398
Date: Thu, 16 Aug 2018 14:12:01 +0800
74a398
Subject: [PATCH] withsctp: use @PACKAGE_VERSION@ in withsctp.h
74a398
74a398
use @PACKAGE_VERSION@ to replace the hardcode version.
74a398
74a398
Signed-off-by: Xin Long <lucien.xin@gmail.com>
74a398
Acked-by: Neil Horman <nhorman@tuxdriver.com>
74a398
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
74a398
---
74a398
 Makefile.rules           | 3 ++-
74a398
 src/withsctp/withsctp.in | 3 ++-
74a398
 2 files changed, 4 insertions(+), 2 deletions(-)
74a398
74a398
diff --git a/Makefile.rules b/Makefile.rules
74a398
index 83f5f0c..d3693fa 100644
74a398
--- a/Makefile.rules
74a398
+++ b/Makefile.rules
74a398
@@ -15,4 +15,5 @@
74a398
 edit = @sed \
74a398
 	-e "s|\@bindir\@|$(bindir)|" \
74a398
 	-e "s|\@libdir\@|$(libdir)|" \
74a398
-	-e "s|\@PACKAGE\@|$(PACKAGE)|"
74a398
+	-e "s|\@PACKAGE\@|$(PACKAGE)|" \
74a398
+	-e "s|\@PACKAGE_VERSION\@|$(PACKAGE_VERSION)|"
74a398
diff --git a/src/withsctp/withsctp.in b/src/withsctp/withsctp.in
74a398
index 7f182ba..fda5ebc 100644
74a398
--- a/src/withsctp/withsctp.in
74a398
+++ b/src/withsctp/withsctp.in
74a398
@@ -2,7 +2,8 @@
74a398
 # -*- sh -*-
74a398
 LIBDIR=`rpm --eval "%{_libdir}"`/@PACKAGE@
74a398
 BINDIR=@bindir@
74a398
-export LD_PRELOAD=${LIBDIR}/libwithsctp.so.1.0.17
74a398
+LIBVER=@PACKAGE_VERSION@
74a398
+export LD_PRELOAD=${LIBDIR}/libwithsctp.so.${LIBVER}
74a398
 if ! ${BINDIR}/checksctp 2> /dev/null
74a398
 then
74a398
     ${BINDIR}/checksctp;
74a398
-- 
74a398
1.8.3.1
74a398