44 lines
1.1 KiB
Text
44 lines
1.1 KiB
Text
$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;
|