shithub: dumb

Download patch

ref: 62d2f05b3a059985d869be2e79ffe35cc88b4bc8
parent: 7da945b75c3bd48821dbc2cfb65b886f80fa501e
parent: 5c103f0aaf3e8446c4f7dad506c2cebfd289b71c
author: Christopher Snowhill <kode54@gmail.com>
date: Sun Dec 17 08:42:50 EST 2017

Merge pull request #81 from dmitrykos/master

Fix compilation with Android NDK by declaring dumb_off_t as off64_t.

--- a/include/dumb.h
+++ b/include/dumb.h
@@ -108,6 +108,12 @@
 #else
 typedef off64_t dumb_off_t;
 #endif
+#elif defined __ANDROID__
+/* Android NDK does not support _FILE_OFFSET_BITS before API level 24
+ * and off_t is is always 32-bit regardless of _FILE_OFFSET_BITS.
+ */
+#include <sys/types.h>
+typedef off64_t dumb_off_t;
 #elif _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 500
 #include <sys/types.h>
 typedef off_t dumb_off_t;