--- a/src/KXLsound.c.orig 2011-08-19 00:57:45.000000000 +0000
+++ a/src/KXLsound.c 2011-08-19 00:57:47.000000000 +0000
@@ -6,7 +6,7 @@
#include <string.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include <linux/soundcard.h>
+#include <sys/soundcard.h>
#include "KXL.h"
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
--- a/src/KXL.h.orig 2011-08-19 00:58:51.000000000 +0000
+++ a/src/KXL.h 2011-08-19 00:58:52.000000000 +0000
@@ -6,7 +6,9 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/XKBlib.h>
+#ifdef __linux__
#include <linux/joystick.h>
+#endif
//================================================================
--- a/src/KXLjoystick.c.orig 2011-08-19 00:59:41.000000000 +0000
+++ a/src/KXLjoystick.c 2011-08-19 01:00:00.000000000 +0000
@@ -16,6 +16,7 @@
Uint8 axis = 2;
Uint8 buttons = 2;
+#ifdef __linux__
KXL_joydev = open(devname, O_RDONLY);
if (KXL_joydev < 0) {
fprintf(stderr, "KXL error message\nCannot open \"%s\".\n", devname);
@@ -29,6 +30,9 @@
fprintf(stderr, "KXL message\nJoystick (%s) has %d axes and %d buttons.\nDriver version is %d.%d.%d.\n",
name, axis, buttons, version >> 16, (version >> 8) & 0xff, version & 0xff);
return True;
+#else
+ return False;
+#endif
}
//==============================================================
@@ -46,11 +50,13 @@
// return value : True - ok, False - NG
//==============================================================
Bool KXL_ReadJoystick(KXL_Joystick *my) {
+#ifdef __linux__
if (KXL_joydev >= 0) {
if (read(KXL_joydev, my, JS_RETURN) == JS_RETURN) {
return True;
}
}
fprintf(stderr, "KXL error message\njoystick reading error\n");
+#endif
return False;
}