[alsa-devel] 1.0.16rc2
Takashi Iwai
tiwai at suse.de
Wed Jan 30 12:21:33 CET 2008
At Wed, 30 Jan 2008 10:09:15 +0000,
Alan Horstmann wrote:
>
> Hi,
>
> I get the following compile error:
>
> make[1]: Entering directory `/usr/share/alsa1.0.16rc2/alsa-driver-1.0.16rc2/acore'
> gcc -D__KERNEL__ -DMODULE=1 -I/usr/share/alsa1.0.16rc2/alsa-driver-1.0.16rc2/include -I/lib/modules/2.4.21-99-athlon/build/include -O2 -mpreferred-stack-boundary=2 -march=athlon -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc -iwithprefix include -DMODVERSIONS -include /lib/modules/2.4.21-99-athlon/build/include/linux/modversions.h -DEXPORT_SYMTAB -c hwdep.c
> In file included from hwdep.c:1:
> /usr/share/alsa1.0.16rc2/alsa-driver-1.0.16rc2/include/adriver.h:1461: error: redefinition of `__ffs'
> /lib/modules/2.4.21-99-athlon/build/include/asm/bitops.h:410: error: `__ffs' previously defined here
> make[1]: *** [hwdep.o] Error 1
> make[1]: Leaving directory `/usr/share/alsa1.0.16rc2/alsa-driver-1.0.16rc2/acore'
> make: *** [compile] Error 1
>
> I have pasted several lines so you can see the context. This wasn't a problem in 1.0.14; I haven't compiled since then.
Could you apply the patch below and use ./hgcompile to configure?
thanks,
Takashi
---
diff -r e600ecb8fbd7 configure.in
--- a/configure.in Wed Jan 30 08:36:00 2008 +0100
+++ b/configure.in Wed Jan 30 12:22:56 2008 +0100
@@ -2597,6 +2597,37 @@ if test "$CONFIG_HAVE_INIT_UTSNAME" = "1
AC_DEFINE(CONFIG_HAVE_INIT_UTSNAME)
fi
+dnl __ffs support?
+if test "$kversion.$kpatchlevel" = "2.6"; then
+ CONFIG_HAVE_FFS=1
+else
+ AC_MSG_CHECKING(for __ffs)
+ init_utsname="0"
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_CC="$CC"
+ CFLAGS="$KERNEL_CHECK_CFLAGS"
+ CC=$KCC
+ AC_TRY_COMPILE([
+#define __KERNEL__
+#include <linux/config.h>
+#include <linux/bitops.h>
+],[
+ unsigned long (*x)(unsigned long);
+ x = __ffs;
+],
+ AC_MSG_RESULT(yes);have_ffs="1",
+ AC_MSG_RESULT(no);have_ffs="0",
+ AC_MSG_RESULT(unknown);have_ffs="0"
+)
+ CFLAGS=$ac_save_CFLAGS
+ CC=$ac_save_CC
+ CONFIG_HAVE_FFS=$have_ffs
+fi
+dnl AC_SUBST(CONFIG_HAVE_FFS)
+if test "$CONFIG_HAVE_FFS" = "1"; then
+ AC_DEFINE(CONFIG_HAVE_FFS)
+fi
+
dnl PnP supports suspend/resume?
if test "$CONFIG_PNP_KERNEL" = "y"; then
AC_MSG_CHECKING(for PnP suspend/resume)
diff -r e600ecb8fbd7 include/adriver.h
--- a/include/adriver.h Wed Jan 30 08:36:00 2008 +0100
+++ b/include/adriver.h Wed Jan 30 12:22:56 2008 +0100
@@ -1455,7 +1455,7 @@ static inline unsigned char snd_pci_revi
#endif
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 3)
+#ifndef CONFIG_HAVE_FFS
#if defined(__i386__)
static inline unsigned long __ffs(unsigned long word)
{
diff -r e600ecb8fbd7 include/config.h.in
--- a/include/config.h.in Wed Jan 30 08:36:00 2008 +0100
+++ b/include/config.h.in Wed Jan 30 12:22:56 2008 +0100
@@ -44,6 +44,7 @@
#undef CONFIG_HAVE_TTY_COUNT_ATOMIC
#undef CONFIG_HAVE_VIDEO_GET_DRVDATA
#undef CONFIG_HAVE_DUMP_STACK
+#undef CONFIG_HAVE_FFS
/* 2.2 kernels */
#undef CONFIG_OLD_KILL_FASYNC
More information about the Alsa-devel
mailing list