Fix build error on freebsd
authorPeng Huang <shawn.p.huang@gmail.com>
Mon, 24 Aug 2009 13:24:52 +0000 (21:24 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Mon, 24 Aug 2009 13:24:52 +0000 (21:24 +0800)
src/test-keymap.c

index ec9c207..e4168e6 100644 (file)
@@ -1,10 +1,19 @@
-#include <linux/input.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include "ibus.h"
 
+#ifndef __linux__
+/* the test is supported only on linux */
+int main (int argc, char **argv)
+{
+    return 3;
+}
+#else
+
+#include <linux/input.h>
+
 #define KEYBOARDPATH "/dev/input/event4"
 
 int main (int argc, char **argv)
@@ -42,3 +51,4 @@ int main (int argc, char **argv)
        return 0;
 
 }
+#endif