lksctp-tools/lksctp-tools-1.0.18-withsctp-use-PACKAGE_VERSION-in-withsctp.h.patch
Petr Šabata fe4338fead RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/lksctp-tools#344afd78b4a857fee0ac3cfac996fd9dd7fe7132
2020-10-15 18:24:18 +02:00

44 lines
1.3 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
use @PACKAGE_VERSION@ to replace the hardcode version.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---
Makefile.rules | 3 ++-
src/withsctp/withsctp.in | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile.rules b/Makefile.rules
index 83f5f0c..d3693fa 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -15,4 +15,5 @@
edit = @sed \
-e "s|\@bindir\@|$(bindir)|" \
-e "s|\@libdir\@|$(libdir)|" \
- -e "s|\@PACKAGE\@|$(PACKAGE)|"
+ -e "s|\@PACKAGE\@|$(PACKAGE)|" \
+ -e "s|\@PACKAGE_VERSION\@|$(PACKAGE_VERSION)|"
diff --git a/src/withsctp/withsctp.in b/src/withsctp/withsctp.in
index 7f182ba..fda5ebc 100644
--- a/src/withsctp/withsctp.in
+++ b/src/withsctp/withsctp.in
@@ -2,7 +2,8 @@
# -*- sh -*-
LIBDIR=`rpm --eval "%{_libdir}"`/@PACKAGE@
BINDIR=@bindir@
-export LD_PRELOAD=${LIBDIR}/libwithsctp.so.1.0.17
+LIBVER=@PACKAGE_VERSION@
+export LD_PRELOAD=${LIBDIR}/libwithsctp.so.${LIBVER}
if ! ${BINDIR}/checksctp 2> /dev/null
then
${BINDIR}/checksctp;
--
1.8.3.1