diff -up sysprof-1.0.11/module/sysprof-module.c.orig sysprof-1.0.11/module/sysprof-module.c --- sysprof-1.0.11/module/sysprof-module.c.orig 2008-11-13 10:30:14.000000000 +0100 +++ sysprof-1.0.11/module/sysprof-module.c 2008-11-13 10:56:33.000000000 +0100 @@ -67,25 +67,27 @@ DECLARE_WAIT_QUEUE_HEAD (wait_for_trace) DECLARE_WAIT_QUEUE_HEAD (wait_for_exit); /* Macro the names of the registers that are used on each architecture */ -#if defined(CONFIG_X86_64) -# define REG_FRAME_PTR rbp -# define REG_INS_PTR rip -# define REG_STACK_PTR rsp -# define REG_STACK_PTR0 rsp0 -#elif defined(CONFIG_X86) -# if LINUX_VERSION_CODE >= KERNEL_VERSION (2,6,25) -# define REG_FRAME_PTR bp -# define REG_INS_PTR ip -# define REG_STACK_PTR sp -# define REG_STACK_PTR0 sp0 +#if !defined(CONFIG_X86_64) && !defined(CONFIG_X86) +# error Sysprof only supports the i386 and x86-64 architectures +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION (2,6,25) +# define REG_FRAME_PTR bp +# define REG_INS_PTR ip +# define REG_STACK_PTR sp +# define REG_STACK_PTR0 sp0 +#else +# if defined(CONFIG_X86_64) +# define REG_FRAME_PTR rbp +# define REG_INS_PTR rip +# define REG_STACK_PTR rsp +# define REG_STACK_PTR0 rsp0 # else # define REG_FRAME_PTR ebp # define REG_INS_PTR eip # define REG_STACK_PTR esp # define REG_STACK_PTR0 esp0 # endif -#else -# error Sysprof only supports the i386 and x86-64 architectures #endif typedef struct userspace_reader userspace_reader;