summaryrefslogtreecommitdiffstats
path: root/kbx/keybox-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'kbx/keybox-file.c')
-rw-r--r--kbx/keybox-file.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/kbx/keybox-file.c b/kbx/keybox-file.c
index db3164fef..fe02c1f9f 100644
--- a/kbx/keybox-file.c
+++ b/kbx/keybox-file.c
@@ -27,6 +27,22 @@
#include "keybox-defs.h"
+
+#if !defined(HAVE_FTELLO) && !defined(ftello)
+static off_t
+ftello (FILE *stream)
+{
+ long int off;
+
+ off = ftell (stream);
+ if (off == -1)
+ return (off_t)-1;
+ return off;
+}
+#endif /* !defined(HAVE_FTELLO) && !defined(ftello) */
+
+
+
/* Read a block at the current postion and return it in r_blob.
r_blob may be NULL to simply skip the current block */
int