lkml.org 
[lkml]   [2002]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Linux 2.5.27-dj1
On Sun, 21 Jul 2002, A Guy Called Tyketto wrote:

> fs/fs.o: In function `proc_pid_stat':
> fs/fs.o(.text+0x2214b): undefined reference to `jiffies_64_to_clock_t'
> fs/fs.o: In function `kstat_read_proc':
> fs/fs.o(.text+0x232f3): undefined reference to `jiffies_64_to_clock_t'
> fs/fs.o(.text+0x2335a): undefined reference to `jiffies_64_to_clock_t'

The following patch adds the missing definition of
jiffies_64_to_clock_t(). It still applies to 2.5.27-dj1.

Tim


--- linux-2.5.25-dj2/include/linux/times.h Sat Jul 13 08:40:21 2002
+++ linux-2.5.25-dj2-jfix/include/linux/times.h Sat Jul 13 09:06:05 2002
@@ -2,7 +2,22 @@
#define _LINUX_TIMES_H

#ifdef __KERNEL__
+#include <asm/div64.h>
+#include <asm/types.h>
+
# define jiffies_to_clock_t(x) ((x) / (HZ / USER_HZ))
+
+/*
+ * returning a different type than the function name says is
+ * ugly as hell, and only intended to stay until I know what type
+ * should replace clock_t
+ */
+
+static inline u64 jiffies_64_to_clock_t(u64 x)
+{
+ do_div(x, HZ / USER_HZ);
+ return x;
+}
#endif

struct tms {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.049 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site