From e805539905aaf7f21e30c2133e4351813c9dda54 Mon Sep 17 00:00:00 2001 From: B. Watson Date: Tue, 14 Feb 2017 16:57:26 -0500 Subject: system/reiser4progs: Fix 3rd party linking. --- system/reiser4progs/fix_libreiser4_linking.diff | 31 +++++++++++++++++++++++++ system/reiser4progs/reiser4progs.SlackBuild | 8 ++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 system/reiser4progs/fix_libreiser4_linking.diff (limited to 'system/reiser4progs') diff --git a/system/reiser4progs/fix_libreiser4_linking.diff b/system/reiser4progs/fix_libreiser4_linking.diff new file mode 100644 index 0000000000..748c3da21c --- /dev/null +++ b/system/reiser4progs/fix_libreiser4_linking.diff @@ -0,0 +1,31 @@ +diff -Naur reiser4progs-1.1.0/libreiser4/profile.c reiser4progs-1.1.0.patched/libreiser4/profile.c +--- reiser4progs-1.1.0/libreiser4/profile.c 2015-08-23 13:13:59.000000000 -0400 ++++ reiser4progs-1.1.0.patched/libreiser4/profile.c 2017-02-14 16:48:03.318110246 -0500 +@@ -5,7 +5,8 @@ + + + #include +-#include ++#include ++#include + + /* All default plugin ids. This is used for getting plugin id if it cannot be + obtained by usual way (get from disk structures, etc.). All these may be +@@ -332,6 +333,7 @@ + reiser4_plug_t *plug; + long long int val; + uint8_t i; ++ char *error; + + aal_assert("umka-924", slot != NULL); + aal_assert("umka-923", name != NULL); +@@ -354,7 +356,8 @@ + } + + if (defprof.pid[i].id.type == PARAM_PLUG_TYPE) { +- if ((val = misc_str2long((char *)name, 10)) == INVAL_DIG) { ++ val = strtol((char *)name, &error, 10); ++ if (errno == ERANGE || *error) { + aal_error("Invalid value \"%s\" is provided for the " + "profile slot \"%s\".", (char *)name, + defprof.pid[i].name); diff --git a/system/reiser4progs/reiser4progs.SlackBuild b/system/reiser4progs/reiser4progs.SlackBuild index ab58d3f13a..1728c00da4 100644 --- a/system/reiser4progs/reiser4progs.SlackBuild +++ b/system/reiser4progs/reiser4progs.SlackBuild @@ -6,7 +6,7 @@ PRGNAM=reiser4progs VERSION=${VERSION:-1.1.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -52,6 +52,12 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# 20170214 bkw: Fix unresolved symbol errors when trying to link with +# -lreiser4. This doesn't affect reiser4progs itself, but allows other +# programs (in particular, partclone) to link with its library. Patched +# code originally came from the partclone maintainer. +patch -p1 < $CWD/fix_libreiser4_linking.diff + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ -- cgit v1.2.3