summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontends/amiga/os3support.c7
-rw-r--r--frontends/amiga/os3support.h5
-rw-r--r--utils/file.c4
3 files changed, 15 insertions, 1 deletions
diff --git a/frontends/amiga/os3support.c b/frontends/amiga/os3support.c
index 645496b73..98843c702 100644
--- a/frontends/amiga/os3support.c
+++ b/frontends/amiga/os3support.c
@@ -28,7 +28,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
-#include <dirent.h>
#include <proto/bullet.h>
#include <proto/exec.h>
@@ -182,6 +181,12 @@ char *strsep(char **s1, const char *s2)
return p1;
}
+int alphasort(const struct dirent **d1, const struct dirent **d2)
+{
+ /*\todo stub function, needs writing, preferably into clib2 */
+ return 0;
+}
+
int scandir(const char *dir, struct dirent ***namelist,
int (*filter)(const struct dirent *),
int (*compar)(const struct dirent **, const struct dirent **))
diff --git a/frontends/amiga/os3support.h b/frontends/amiga/os3support.h
index fde032a18..dc4e06503 100644
--- a/frontends/amiga/os3support.h
+++ b/frontends/amiga/os3support.h
@@ -27,6 +27,7 @@
#ifndef __amigaos4__
#include <stdint.h>
+#include <dirent.h>
#include <proto/exec.h>
#include <proto/dos.h>
@@ -257,6 +258,10 @@ char *ASPrintf(const char *fmt, ...);
/* C */
char *strlwr(char *str);
+int alphasort(const struct dirent **d1, const struct dirent **d2);
+int scandir(const char *dir, struct dirent ***namelist,
+ int (*filter)(const struct dirent *),
+ int (*compar)(const struct dirent **, const struct dirent **));
#endif
#endif
diff --git a/utils/file.c b/utils/file.c
index 7eff6a780..c963719a7 100644
--- a/utils/file.c
+++ b/utils/file.c
@@ -38,6 +38,10 @@
#include "utils/file.h"
#include "utils/dirent.h"
+#ifdef __AMIGA__
+#include "frontends/amiga/os3support.h"
+#endif
+
/**
* Generate a posix path from one or more component elemnts.
*