summaryrefslogtreecommitdiff
path: root/uisimulator/x11/dir.h
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/x11/dir.h')
-rw-r--r--uisimulator/x11/dir.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/uisimulator/x11/dir.h b/uisimulator/x11/dir.h
index c7d557b475..3e83ce44b4 100644
--- a/uisimulator/x11/dir.h
+++ b/uisimulator/x11/dir.h
@@ -17,10 +17,26 @@
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19 19
20#define dirent x11_dirent
21#define readdir(x) x11_readdir(x)
22#define opendir(x) x11_opendir(x)
23
24/*
25 * The defines above should let us use the readdir() and opendir() in target
26 * code just as they're defined to work in target. They will then call our
27 * x11_* versions of the functions that'll work as wrappers for the actual
28 * host functions.
29 */
30
20#include <sys/types.h> 31#include <sys/types.h>
21#include <dirent.h> 32#include <dirent.h>
22 33
23#define opendir(x) x11_opendir(x) 34#undef dirent
35
36
37#define DIRFUNCTIONS_DEFINED /* prevent those prototypes */
24 38
25#define DIRENT_DEFINED /* prevent it from getting defined again */
26#include "../../firmware/common/dir.h" 39#include "../../firmware/common/dir.h"
40
41extern DIR *x11_opendir(char *name);
42