File libtwin0-broken-open.diff of Package libtwin0
Index: libtwin0-0.0.3/libtwin/twin_cursor.c
===================================================================
--- libtwin0-0.0.3.orig/libtwin/twin_cursor.c
+++ libtwin0-0.0.3/libtwin/twin_cursor.c
@@ -181,8 +181,14 @@ twin_pixmap_t *twin_load_X_cursor(const
twin_pixmap_t *cur = NULL;
fd = cursor_open(file);
+
+#ifdef HAVE_ZLIB
+ if (fd == NULL)
+#else
if (fd < 0)
+#endif
return NULL;
+
if (!twin_read_header(fd, buffer, XCURSOR_FILE_HEADER_LEN))
goto bail;