$OpenBSD: patch-libxio_libxio_c,v 1.1.1.1 2005/01/25 21:58:59 naddy Exp $
--- libxio/libxio.c.orig	Sat Jan  8 19:13:59 2005
+++ libxio/libxio.c	Sat Jan  8 19:17:59 2005
@@ -41,7 +41,11 @@ char *strndup(const char *s, size_t n);
 #include <sys/stat.h>
 #include <sys/errno.h>
 #include <stdarg.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
 
+
 struct xio_handle_t {
 
 	ssize_t (*xio_read_v)(void *stream, void *buf, size_t count);
@@ -704,7 +708,7 @@ xio_open(const char *pathname, int flags
 	_handles[ret_fd]->xio_ftruncate_v = (int (*)(void *, off_t))&ftruncate;
 	_handles[ret_fd]->xio_fstat_v = (int (*)(void *, struct stat *))&fstat;
 	
-	_handles[ret_fd]->data = (void *)open(pathname, flags, mode);
+	_handles[ret_fd]->data = (void *)(intptr_t)open(pathname, flags, mode);
 	
 	if(!_handles[ret_fd]->data) {
 		free(_handles[ret_fd]);
