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