Improved compiling on 2.6.34 (thanks to Malcolm Lewis).

This commit is contained in:
Florian Pose 2010-10-25 16:45:33 +02:00
parent 83e1173e12
commit f739694670
10 changed files with 15 additions and 2 deletions

View File

@ -33,6 +33,10 @@
#include <linux/interrupt.h>
#include <linux/err.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
#include <linux/slab.h>
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
#include <linux/semaphore.h>
#else

View File

@ -30,6 +30,7 @@
#include <linux/module.h>
#include <linux/err.h>
#include <linux/termios.h>
#include <linux/slab.h>
#include "../../include/ecrt.h" // EtherCAT realtime interface
#include "../../include/ectty.h" // EtherCAT TTY interface

View File

@ -35,7 +35,7 @@ lib_LTLIBRARIES = libethercat.la
#------------------------------------------------------------------------------
libethercat_la_LDFLAGS = -version-info 1:0:0
libethercat_la_CFLAGS = -I$(srcdir)/..
libethercat_la_CFLAGS = -I$(srcdir)/.. -fno-strict-aliasing
libethercat_la_SOURCES = \
common.c \
domain.c \

View File

@ -37,6 +37,8 @@
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <sys/socket.h>
#include "master.h"
#include "master/ioctl.h"

View File

@ -49,6 +49,7 @@ int ecrt_master_reserve(ec_master_t *master)
strerror(errno));
return -1;
}
return 0;
}
/*****************************************************************************/

View File

@ -35,6 +35,7 @@
#include <linux/module.h>
#include <linux/jiffies.h>
#include <linux/slab.h>
#include "foe_request.h"
#include "foe.h"

View File

@ -35,6 +35,7 @@
#include <linux/module.h>
#include <linux/jiffies.h>
#include <linux/slab.h>
#include "sdo_request.h"

View File

@ -35,6 +35,7 @@
#include <linux/module.h>
#include <linux/jiffies.h>
#include <linux/slab.h>
#include "soe_request.h"

View File

@ -128,6 +128,7 @@ REV = `if test -s $(top_srcdir)/revision; then \
ethercat_CXXFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/master \
-Wall -DREV=$(REV)
-Wall -DREV=$(REV) \
-fno-strict-aliasing
#------------------------------------------------------------------------------

View File

@ -43,6 +43,7 @@
#include <linux/version.h>
#include <linux/serial.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
#include "../master/globals.h"
#include "../include/ectty.h"