X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=libpicofe.git;a=blobdiff_plain;f=posix.h;h=35f4d2836a1eed84ab04ea867e0b26aa0113b035;hp=ca30edb9958f5727951bde50cf17088991b7cf78;hb=HEAD;hpb=dfe767a5facc30a07e0fdda2b85cf39662ec3fed diff --git a/posix.h b/posix.h index ca30edb..6ab9a7f 100644 --- a/posix.h +++ b/posix.h @@ -2,7 +2,7 @@ #define LIBPICOFE_POSIX_H /* define POSIX stuff: dirent, scandir, getcwd, mkdir */ -#if defined(__linux__) || defined(__MINGW32__) +#if defined(__FreeBSD__) || defined(__MACH__) || defined(__linux__) || defined(__MINGW32__) #include #include @@ -23,12 +23,14 @@ #include #include +#ifndef DT_DIR /* map PSP names to posix. needs special scandir() function to mask rwx bits */ #define d_type d_stat.st_attr #define DT_LNK FIO_SO_IFLNK #define DT_DIR FIO_SO_IFDIR #define DT_REG FIO_SO_IFREG #define DT_UNKNOWN 0 +#endif #else