summaryrefslogtreecommitdiffstats
path: root/libraries/oath-toolkit/oath-toolkit-new-glibc-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/oath-toolkit/oath-toolkit-new-glibc-check.patch')
-rw-r--r--libraries/oath-toolkit/oath-toolkit-new-glibc-check.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/libraries/oath-toolkit/oath-toolkit-new-glibc-check.patch b/libraries/oath-toolkit/oath-toolkit-new-glibc-check.patch
new file mode 100644
index 0000000000..eab3315fbc
--- /dev/null
+++ b/libraries/oath-toolkit/oath-toolkit-new-glibc-check.patch
@@ -0,0 +1,25 @@
+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__