AC_SUBST(kmoduledir)
subdirs="$subdirs kernel"
- old_cflags="$CFLAGS"
- CFLAGS="-I${kernelsrc}/include -Wall -O2 -D__KERNEL__"
- AC_CHECK_DECL(i_size_read,
- AC_DEFINE(HAVE_I_SIZE_FUNC, 1,
- [Kernel has i_size_read() and i_size_write() functions]),,
- [#include <linux/fs.h>])
- CFLAGS="$old_cflags"
+ if echo "$kernsrcver" | grep -q "^2.4"; then
+ old_cflags="$CFLAGS"
+ CFLAGS="-I${kernelsrc}/include -Wall -O2 -fno-strict-aliasing -D__KERNEL__"
+ AC_CHECK_DECL(i_size_read,
+ AC_DEFINE(HAVE_I_SIZE_FUNC, 1,
+ [Kernel has i_size_read() and i_size_write() functions]),,
+ [#include <linux/fs.h>])
+ CFLAGS="$old_cflags"
+ fi
fi
if test "$enable_lib" != "no"; then