On Thu, Aug 16, 2018 at 02:12:01PM +0800, Xin Long wrote: > use @PACKAGE_VERSION@ to replace the hardcode version. > > Signed-off-by: Xin Long <lucien.xin@xxxxxxxxx> > --- > 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=@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; > -- > 2.1.0 > > Acked-by: Neil Horman <nhorman@xxxxxxxxxxxxx>