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