mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-19 18:12:54 -05:00
adjusted to build on my solaris box
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@493 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
27dfc7c14e
commit
e3a12d34ea
3 changed files with 29 additions and 32 deletions
|
|
@ -1,8 +1,20 @@
|
|||
|
||||
#include <sys/stat.h>
|
||||
#include "dir.h"
|
||||
#include <dirent.h>
|
||||
|
||||
#undef DIR
|
||||
#define DIRFUNCTIONS_DEFINED /* prevent those prototypes */
|
||||
#define dirent x11_dirent
|
||||
#include "../../firmware/common/dir.h"
|
||||
#undef dirent
|
||||
|
||||
#define SIMULATOR_ARCHOS_ROOT "archos"
|
||||
|
||||
struct mydir {
|
||||
DIR *dir;
|
||||
char *name;
|
||||
};
|
||||
|
||||
typedef struct mydir MYDIR;
|
||||
|
||||
MYDIR *x11_opendir(char *name)
|
||||
{
|
||||
|
|
@ -21,13 +33,15 @@ MYDIR *x11_opendir(char *name)
|
|||
return my;
|
||||
}
|
||||
|
||||
struct dirent *x11_readdir(MYDIR *dir)
|
||||
struct x11_dirent *x11_readdir(MYDIR *dir)
|
||||
{
|
||||
char buffer[512]; /* sufficiently big */
|
||||
static struct dirent secret;
|
||||
static struct x11_dirent secret;
|
||||
struct stat s;
|
||||
struct dirent *x11 = (readdir)(dir->dir);
|
||||
|
||||
struct x11_dirent *x11 = (readdir)(dir->dir);
|
||||
if(!x11)
|
||||
return NULL;
|
||||
|
||||
strcpy(secret.d_name, x11->d_name);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue