Added semaphore header distinction in minimal example.
authorFlorian Pose <fp@igh-essen.com>
Mon, 13 Jul 2009 15:26:28 +0000
changeset 1501 59990318c95b
parent 1500 ed1a733efbc5
child 1502 9715a5599590
Added semaphore header distinction in minimal example.
examples/mini/mini.c
--- a/examples/mini/mini.c	Mon Jul 13 15:18:28 2009 +0000
+++ b/examples/mini/mini.c	Mon Jul 13 15:26:28 2009 +0000
@@ -27,12 +27,18 @@
  *
  *****************************************************************************/
 
+#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/timer.h>
-#include <linux/semaphore.h>
 #include <linux/interrupt.h>
 #include <linux/err.h>
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+#include <linux/semaphore.h>
+#else
+#include <asm/semaphore.h>
+#endif
+
 #include "../../include/ecrt.h" // EtherCAT realtime interface
 
 /*****************************************************************************/