summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIngo Weinhold <ingo_weinhold@gmx.de>2013-03-30 11:18:36 +0000
committerMichael Schroeder <mls@suse.de>2013-04-16 11:01:48 +0200
commit9cc22a482d19294d29175a366c76c8cc0cf09145 (patch)
tree76dd6e8268a0bc4f001e32baa6dd8951eddb3527 /ext
parent83145da7966e63a78a5065ec2c186d182488e494 (diff)
downloadlibsolv-9cc22a482d19294d29175a366c76c8cc0cf09145.tar.gz
libsolv-9cc22a482d19294d29175a366c76c8cc0cf09145.tar.bz2
libsolv-9cc22a482d19294d29175a366c76c8cc0cf09145.zip
Use the hidden fopencookie() on Haiku
Diffstat (limited to 'ext')
-rw-r--r--ext/solv_xfopen.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/solv_xfopen.c b/ext/solv_xfopen.c
index a9a6e40..63fec23 100644
--- a/ext/solv_xfopen.c
+++ b/ext/solv_xfopen.c
@@ -17,6 +17,23 @@
#include "util.h"
+/* Evil hack for Haiku: fopencookie() is implemented internally, but not
+ exported by a header. */
+#ifdef __HAIKU__
+
+typedef struct {
+ ssize_t (*read)(void*, char*, size_t);
+ ssize_t (*write)(void*, const char*, size_t);
+ int (*seek)(off_t*, int);
+ int (*close)(void*);
+} cookie_io_functions_t;
+
+
+FILE *fopencookie(void*, const char*, cookie_io_functions_t);
+
+#endif /* __HAIKU__ */
+
+
static FILE *cookieopen(void *cookie, const char *mode,
ssize_t (*cread)(void *, char *, size_t),
ssize_t (*cwrite)(void *, const char *, size_t),