summaryrefslogtreecommitdiff
path: root/libraries/oath-toolkit
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-07-05 00:25:37 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-07-05 08:52:32 +0700
commit04be6b5068f52198e43a42b6a9b48abe7df4476a (patch)
tree488e25d325c4c1583d66c6194026eac8eedefdd6 /libraries/oath-toolkit
parentc9542caa88962982340a806ea02ceee8bb5fd11d (diff)
downloadslackbuilds-04be6b5068f52198e43a42b6a9b48abe7df4476a.tar.gz
libraries/oath-toolkit: Fix build on -current.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/oath-toolkit')
-rw-r--r--libraries/oath-toolkit/oath-toolkit-gcc.patch68
-rw-r--r--libraries/oath-toolkit/oath-toolkit.SlackBuild2
2 files changed, 70 insertions, 0 deletions
diff --git a/libraries/oath-toolkit/oath-toolkit-gcc.patch b/libraries/oath-toolkit/oath-toolkit-gcc.patch
new file mode 100644
index 0000000000..3c52d7cde5
--- /dev/null
+++ b/libraries/oath-toolkit/oath-toolkit-gcc.patch
@@ -0,0 +1,68 @@
+--- oath-toolkit-2.6.2/libpskc/gl/intprops.h.orig 2017-07-05 00:14:44.595175474 +0700
++++ oath-toolkit-2.6.2/libpskc/gl/intprops.h 2017-07-05 00:16:26.580176632 +0700
+@@ -230,11 +230,11 @@
+ (e.g., A and B) have the same type as MIN and MAX. Instead, they assume
+ that the result (e.g., A + B) has that type. */
+ #if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
+-# define _GL_ADD_OVERFLOW(a, b, min, max)
++# define _GL_ADD_OVERFLOW(a, b, min, max) \
+ __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
+-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
+-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
+ #else
+ # define _GL_ADD_OVERFLOW(a, b, min, max) \
+--- oath-toolkit-2.6.2/oathtool/gl/intprops.h.orig 2017-07-05 00:16:45.637176849 +0700
++++ oath-toolkit-2.6.2/oathtool/gl/intprops.h 2017-07-05 00:21:02.898179771 +0700
+@@ -230,11 +230,11 @@
+ (e.g., A and B) have the same type as MIN and MAX. Instead, they assume
+ that the result (e.g., A + B) has that type. */
+ #if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
+-# define _GL_ADD_OVERFLOW(a, b, min, max)
++# define _GL_ADD_OVERFLOW(a, b, min, max) \
+ __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
+-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
+-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
+ #else
+ # define _GL_ADD_OVERFLOW(a, b, min, max) \
+--- oath-toolkit-2.6.2/pskctool/gl/intprops.h.orig 2017-07-05 00:21:45.109180251 +0700
++++ oath-toolkit-2.6.2/pskctool/gl/intprops.h 2017-07-05 00:22:06.895180498 +0700
+@@ -230,11 +230,11 @@
+ (e.g., A and B) have the same type as MIN and MAX. Instead, they assume
+ that the result (e.g., A + B) has that type. */
+ #if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
+-# define _GL_ADD_OVERFLOW(a, b, min, max)
++# define _GL_ADD_OVERFLOW(a, b, min, max) \
+ __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
+-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
+-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
+ #else
+ # define _GL_ADD_OVERFLOW(a, b, min, max) \
+--- oath-toolkit-2.6.2/liboath/gl/tests/intprops.h.orig 2017-07-05 00:22:52.355181015 +0700
++++ oath-toolkit-2.6.2/liboath/gl/tests/intprops.h 2017-07-05 00:23:18.133181307 +0700
+@@ -230,11 +230,11 @@
+ (e.g., A and B) have the same type as MIN and MAX. Instead, they assume
+ that the result (e.g., A + B) has that type. */
+ #if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
+-# define _GL_ADD_OVERFLOW(a, b, min, max)
++# define _GL_ADD_OVERFLOW(a, b, min, max) \
+ __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
+-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
+-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
+ #else
+ # define _GL_ADD_OVERFLOW(a, b, min, max) \
diff --git a/libraries/oath-toolkit/oath-toolkit.SlackBuild b/libraries/oath-toolkit/oath-toolkit.SlackBuild
index 34d8c569ec..a7a678abaf 100644
--- a/libraries/oath-toolkit/oath-toolkit.SlackBuild
+++ b/libraries/oath-toolkit/oath-toolkit.SlackBuild
@@ -69,6 +69,8 @@ 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 {} \;
+patch -p1 < $CWD/oath-toolkit-gcc.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \