summaryrefslogtreecommitdiff
path: root/system/reiser4progs/fix_libreiser4_linking.diff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2017-02-14 16:57:26 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-02-18 07:54:15 +0700
commite805539905aaf7f21e30c2133e4351813c9dda54 (patch)
tree4a3d21c980390a44df96f136dfa5c2872ad3629f /system/reiser4progs/fix_libreiser4_linking.diff
parentae160a0f651aefef0e7be9d0d40994fc1b03c379 (diff)
downloadslackbuilds-e805539905aaf7f21e30c2133e4351813c9dda54.tar.gz
system/reiser4progs: Fix 3rd party linking.
Diffstat (limited to 'system/reiser4progs/fix_libreiser4_linking.diff')
-rw-r--r--system/reiser4progs/fix_libreiser4_linking.diff31
1 files changed, 31 insertions, 0 deletions
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 <reiser4/libreiser4.h>
+-#include <misc/misc.h>
++#include <stdlib.h>
++#include <errno.h>
+
+ /* 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);