summaryrefslogtreecommitdiff
path: root/uisimulator/x11
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-07-04 08:30:01 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-07-04 08:30:01 +0000
commitf6ed970b118d0fc6335396cef1282bff5a9c2b3d (patch)
tree01c33cd0b2247199ea15e766a25806a90d538fe0 /uisimulator/x11
parent92b1d85b4818d29202af6afcec1548e21ec6c956 (diff)
Added FreeBSD support to uisimulator. Patch by Keith Hubbard
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3811 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/x11')
-rw-r--r--uisimulator/x11/Makefile12
-rw-r--r--uisimulator/x11/io.c5
2 files changed, 15 insertions, 2 deletions
diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile
index 05116edbd9..2ce4606468 100644
--- a/uisimulator/x11/Makefile
+++ b/uisimulator/x11/Makefile
@@ -64,19 +64,27 @@ ifeq ($(UNAME),Linux)
LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl -ldl
INCLUDES += -I/usr/X11R6/include
LIBDIRS = -L/usr/X11R6/lib
- DEFINES += -DLINUX
+ DEFINES += -DHAVE_OSS
else
ifeq ($(UNAME),CYGWIN)
LDFLAGS = -lSM -lICE -lXt -lX11 -lXmu -lSM -lICE -lX11
INCLUDES += -I/usr/X11R6/include
LIBDIRS = -L/usr/X11R6/lib
- DEFINES += -DLINUX
+ DEFINES += -DHAVE_OSS
+else
+ifeq ($(UNAME),FreeBSD)
+ LIBS = -pthread
+ LDFLAGS = -lX11 -lm -lXt -lXmu
+ INCLUDES += -I/usr/X11R6/include
+ LIBDIRS = -L/usr/X11R6/lib
+ DEFINES += -DHAVE_OSS
else
LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl -ldl
DEFINES += -DBIG_ENDIAN
LIBDIRS =
endif
endif
+endif
CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) -W -Wall
diff --git a/uisimulator/x11/io.c b/uisimulator/x11/io.c
index 5b3cff7006..6fc82cc6f7 100644
--- a/uisimulator/x11/io.c
+++ b/uisimulator/x11/io.c
@@ -21,7 +21,12 @@
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
+#ifdef __FreeBSD__
+#include <sys/param.h>
+#include <sys/mount.h>
+#else
#include <sys/vfs.h>
+#endif
#include <dirent.h>
#include <unistd.h>