summaryrefslogtreecommitdiff
path: root/sysutils/gnome-vfs/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/gnome-vfs/patches/patch-ac')
-rw-r--r--sysutils/gnome-vfs/patches/patch-ac44
1 files changed, 44 insertions, 0 deletions
diff --git a/sysutils/gnome-vfs/patches/patch-ac b/sysutils/gnome-vfs/patches/patch-ac
new file mode 100644
index 00000000000..5bee6d30607
--- /dev/null
+++ b/sysutils/gnome-vfs/patches/patch-ac
@@ -0,0 +1,44 @@
+$NetBSD: patch-ac,v 1.1.1.1 2000/11/25 13:57:10 rh Exp $
+
+--- modules/file-method.c.orig Thu Nov 16 07:57:37 2000
++++ modules/file-method.c
+@@ -37,6 +37,7 @@
+ #include <malloc.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/param.h>
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <utime.h>
+@@ -723,9 +724,15 @@
+ filter_needs = GNOME_VFS_DIRECTORY_FILTER_NEEDS_NOTHING;
+ }
+
++#if (defined(BSD) && BSD >= 199306)
++ if ((result = readdir (handle->dir)) != NULL) {
++ *handle->current_entry = *result;
++ }
++#else
+ if (readdir_r (handle->dir, handle->current_entry, &result) != 0) {
+ return gnome_vfs_result_from_errno ();
+ }
++#endif
+
+ if (result == NULL) {
+ return GNOME_VFS_ERROR_EOF;
+@@ -1054,9 +1061,15 @@
+
+ item_buffer = g_malloc (sizeof (struct dirent) + GET_PATH_MAX() + 1);
+ for (;;) {
++#if (defined(BSD) && BSD >= 199306)
++ if ((item = readdir (directory)) != NULL) {
++ *item_buffer = *item;
++ }
++#else
+ if (readdir_r (directory, item_buffer, &item) != 0 || item == NULL) {
+ break;
+ }
++#endif
+
+ if (gnome_vfs_context_check_cancellation (context))
+ break;