Article 51WJ4 SBo oath-toolkit on -current needs a patch

SBo oath-toolkit on -current needs a patch

by
tfonz
from LinuxQuestions.org on (#51WJ4)
On my -current oath-toolkit failed to compile with

Code:fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."It compiled fine after applying a patch from Debian that I found at https://bugs.debian.org/cgi-bin/bugr...cgi?bug=915175

The patch is:

Code:Description: Check _IO_EOF_SEEN instead of _IO_ftrylockfile
Needed to get fseeko.c to build with glibc 2.28.
Inspired by https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e.
Author: Sascha Steinbiss <satta@debian.org>
Last-Update: 2019-02-09
--- a/liboath/gl/fseeko.c
+++ b/liboath/gl/fseeko.c
@@ -47,7 +47,7 @@
#endif

/* These tests are based on fpurge.c. */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
if (fp->_IO_read_end == fp->_IO_read_ptr
&& fp->_IO_write_ptr == fp->_IO_write_base
&& fp->_IO_save_base == NULL)
@@ -123,7 +123,7 @@
return -1;
}

-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags &= ~_IO_EOF_SEEN;
fp->_offset = pos;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__The change to the SlackBuild is:

Code:--- oath-toolkit/oath-toolkit.SlackBuild.orig 2020-04-08 14:55:10.575368954 +0200
+++ oath-toolkit/oath-toolkit.SlackBuild 2020-04-08 14:43:32.466195197 +0200
@@ -70,6 +70,7 @@
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

patch -p1 < $CWD/oath-toolkit-gcc.patch
+patch -p1 < $CWD/oath-toolkit-fseek.patch

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \latest?d=yIl2AUoC8zA latest?i=O0xBeGcc-fU:S5E4euR6hwU:F7zBnMy latest?i=O0xBeGcc-fU:S5E4euR6hwU:V_sGLiP latest?d=qj6IDK7rITs latest?i=O0xBeGcc-fU:S5E4euR6hwU:gIN9vFwO0xBeGcc-fU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments