Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / support / dirent.c
index 4673ac51439cfeab01f3553fc5ebdc4691990d9d..bc1b3e238e16730ad5113258b05eb174ec214b6f 100644 (file)
@@ -29,6 +29,7 @@
 
 G_BEGIN_DECLS
 
+#if HAVE_SEEKDIR
 gint32
 Mono_Posix_Syscall_seekdir (void *dir, mph_off_t offset)
 {
@@ -38,12 +39,15 @@ Mono_Posix_Syscall_seekdir (void *dir, mph_off_t offset)
 
        return 0;
 }
+#endif  /* def HAVE_SEEKDIR */
 
+#if HAVE_TELLDIR
 mph_off_t
 Mono_Posix_Syscall_telldir (void *dir)
 {
        return telldir ((DIR*) dir);
 }
+#endif  /* def HAVE_TELLDIR */
 
 static void
 copy_dirent (struct Mono_Posix_Syscall__Dirent *to, struct dirent *from)
@@ -74,6 +78,7 @@ Mono_Posix_Syscall_readdir (void *dirp, struct Mono_Posix_Syscall__Dirent *entry
                return -1;
        }
 
+       errno = 0;
        d = readdir (dirp);
 
        if (d == NULL) {