diff --git a/arch/linux/findfile.c b/arch/linux/findfile.c index abeb97d4b..9c94b6701 100644 --- a/arch/linux/findfile.c +++ b/arch/linux/findfile.c @@ -32,6 +32,8 @@ int FileFindFirst(char *search_str, FILEFINDSTRUCT *ffstruct) r = glob(search_str, 0, NULL, &glob_a); if (r) return 1; + if (! glob_a.gl_pathc) return 1; + glob_whichfile = 0; t = strrchr(glob_a.gl_pathv[glob_whichfile], '/'); diff --git a/include/pstypes.h b/include/pstypes.h index 3140783f7..c240a0a07 100644 --- a/include/pstypes.h +++ b/include/pstypes.h @@ -46,6 +46,9 @@ typedef uint16_t u_int16_t; # include # define _MAX_PATH 1024 # define _MAX_DIR 256 +#ifdef __MACOSX__ +typedef unsigned long ulong; +#endif #elif defined __DJGPP__ # include