backports: include headers directly if math64 header is missing
authorPatrick Ziegler <patrick.ziegler@fh-kl.de>
Thu, 15 Aug 2013 12:40:41 +0000 (14:40 +0200)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Fri, 16 Aug 2013 02:56:27 +0000 (19:56 -0700)
If math64 header is not available, include div64.h directly. It is required for
do_div() that is used inside the backport version of math64.h.

Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
backport/backport-include/linux/math64.h

index 7f3a81b54e567b6421e382bd19c914b52e3e86bb..775c2d37128fd6b3bce283d85ebad34ddfed4304 100644 (file)
@@ -5,6 +5,9 @@
 
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25))
 #include_next <linux/math64.h>
+#else
+#include <linux/types.h>
+#include <asm/div64.h>
 #endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)) */
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)