[alsa-devel] [alsa-cvslog] alsa-driver: Added CONFIG_HAVE_INIT_UTSNAME test
Takashi Iwai
tiwai at suse.de
Mon Jan 21 12:19:21 CET 2008
At Mon, 21 Jan 2008 11:48:06 +0100 (CET),
Jaroslav Kysela wrote:
>
> changeset: 3491:94a0c6eeb244
> tag: tip
> user: perex
> date: Mon Jan 21 11:48:04 2008 +0100
> files: acore/info_oss.c configure.in include/config.h.in
> description:
> Added CONFIG_HAVE_INIT_UTSNAME test
>
>
> diff -r f8ead0afa48d -r 94a0c6eeb244 acore/info_oss.c
> --- a/acore/info_oss.c Mon Jan 21 10:42:45 2008 +0100
> +++ b/acore/info_oss.c Mon Jan 21 11:48:04 2008 +0100
> @@ -1,6 +1,6 @@
> #define __NO_VERSION__
> #include <linux/version.h>
> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
> +#ifdef CONFIG_HAVE_INIT_UTSNAME
> #define init_utsname() (&system_utsname)
> #endif
> #include "adriver.h"
> diff -r f8ead0afa48d -r 94a0c6eeb244 configure.in
> --- a/configure.in Mon Jan 21 10:42:45 2008 +0100
> +++ b/configure.in Mon Jan 21 11:48:04 2008 +0100
> @@ -2566,6 +2566,32 @@ if test "$CONFIG_HAVE_GFP_T" = "1"; then
> AC_DEFINE(CONFIG_HAVE_GFP_T)
> fi
>
> +dnl Check for init_utsname...
> +AC_MSG_CHECKING(for init_utsname)
> +gfp_t="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/utsname.h>
> +],[
> + void *x = init_utsname();
> +],
I'm afraid it won't work. In C, it's fine to call undeclared
functions. It's supposed to be an int function.
Takashi
More information about the Alsa-devel
mailing list