From: kub Date: Thu, 14 Jan 2021 20:57:13 +0000 (+0100) Subject: add minimal PSP support X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfe767a5facc30a07e0fdda2b85cf39662ec3fed;p=libpicofe.git add minimal PSP support --- diff --git a/posix.h b/posix.h index 35f4d28..ca30edb 100644 --- a/posix.h +++ b/posix.h @@ -17,6 +17,19 @@ #define DT_DIR 0 #endif +#elif defined(__PSP__) + +#include +#include +#include + +/* 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 + #else #error "must provide posix"