2005-10-24 15:59:41

by Miklos Szeredi

[permalink] [raw]
Subject: [PATCH 2.6.14-rc5-mm1] UML: fix compile part-2

This patch fixes the following compile error:

LD .tmp_vmlinux1
arch/um/kernel/built-in.o(.text+0x577a): In function `do_gettimeofday':
arch/um/kernel/time.c:128: undefined reference to `clock_was_set'
collect2: ld returned 1 exit status

ktimers patch left all clock_was_set() calls in place presumably
because they will be reused at a later time (?). So this patch does
the same.

Signed-off-by: Miklos Szeredi <[email protected]>

Index: linux/arch/um/kernel/time.c
===================================================================
--- linux.orig/arch/um/kernel/time.c 2005-09-02 11:17:38.000000000 +0200
+++ linux/arch/um/kernel/time.c 2005-10-24 13:26:20.000000000 +0200
@@ -114,8 +114,8 @@ void time_init(void)
wall_to_monotonic.tv_nsec = -now.tv_nsec;
}

-/* Declared in linux/time.h, which can't be included here */
-extern void clock_was_set(void);
+/* Defined in linux/ktimer.h, which can't be included here */
+#define clock_was_set() do { } while (0)

void do_gettimeofday(struct timeval *tv)
{


2005-10-25 02:26:08

by Jeff Dike

[permalink] [raw]
Subject: Re: [PATCH 2.6.14-rc5-mm1] UML: fix compile part-2

On Mon, Oct 24, 2005 at 05:59:27PM +0200, Miklos Szeredi wrote:
> This patch fixes the following compile error:
>
> LD .tmp_vmlinux1
> arch/um/kernel/built-in.o(.text+0x577a): In function `do_gettimeofday':
> arch/um/kernel/time.c:128: undefined reference to `clock_was_set'
> collect2: ld returned 1 exit status
>
> ktimers patch left all clock_was_set() calls in place presumably
> because they will be reused at a later time (?). So this patch does
> the same.
>
> Signed-off-by: Miklos Szeredi <[email protected]>
>
> Index: linux/arch/um/kernel/time.c
> ===================================================================
> --- linux.orig/arch/um/kernel/time.c 2005-09-02 11:17:38.000000000 +0200
> +++ linux/arch/um/kernel/time.c 2005-10-24 13:26:20.000000000 +0200
> @@ -114,8 +114,8 @@ void time_init(void)
> wall_to_monotonic.tv_nsec = -now.tv_nsec;
> }
>
> -/* Declared in linux/time.h, which can't be included here */
> -extern void clock_was_set(void);
> +/* Defined in linux/ktimer.h, which can't be included here */
> +#define clock_was_set() do { } while (0)
>
> void do_gettimeofday(struct timeval *tv)
> {
> -

Acked-by: Jeff Dike <[email protected]>

Jeff