diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-07-06 15:31:56 +0400 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-07-06 15:35:07 +0400 |
commit | bd48453a5e2a9361b63c32a68642fea2857017d5 (patch) | |
tree | 5964485aaf95a6d7bd1b5ec8dd4dc4e96082bd9a /recipes/linux/linux-mainstone | |
parent | 9d90c5c0cf1f778d7f259c8f2f9d3d12221407f6 (diff) |
linux-mainstone: fix building with current gcc
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'recipes/linux/linux-mainstone')
-rw-r--r-- | recipes/linux/linux-mainstone/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/recipes/linux/linux-mainstone/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch b/recipes/linux/linux-mainstone/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch new file mode 100644 index 0000000000..9d7020d9f1 --- /dev/null +++ b/recipes/linux/linux-mainstone/0001-time-prevent-the-loop-in-timespec_add_ns-from-bei.patch @@ -0,0 +1,15 @@ +Index: linux-2.6.24/include/linux/time.h +=================================================================== +--- a/include/linux/time.h ++++ b/include/linux/time.h +@@ -172,6 +172,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns) + { + ns += a->tv_nsec; + while(unlikely(ns >= NSEC_PER_SEC)) { ++ /* The following asm() prevents the compiler from ++ * optimising this loop into a modulo operation. */ ++ asm("" : "+r"(ns)); ++ + ns -= NSEC_PER_SEC; + a->tv_sec++; + } |