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