include: Include <linux/math.h> to resolve implicit declaration of do_div()
PATCH 1/1 include: Include <linux/math.h> to resolve implicit declaration of do_div()
I was testing barebox with randconfig, so I got a warning (treated as an error) : implicit declaration of do_div(). So <linux/math.h> needs to included.
--- include/linux/ktime.h | 1 + 1 file changed, 1 insertion(+)
include/linux/ktime.h +1 -0
@@ -21,6 +21,7 @@#ifndef _LINUX_KTIME_H#define _LINUX_KTIME_H +#include <linux/math.h> #include <linux/time.h> #include <clock.h> #include <linux/bug.h>
---
base-commit: 9d47ff66c3892c5a6ddd4704993365a797fbeb68
change-id: 20241017-errors_fixes-81248755b864
Best regards,
Signature · 1 line
Abdelrahman Youssef <[email protected]>
Quoted 6 lines · On 17.10.24 01:47, Abdelrahman Youssef via B4 Relay wrote:
From: Abdelrahman Youssef <[email protected]>
I was testing barebox with randconfig, so I got a warning (treated as an error) : implicit declaration of
do_div(). So <linux/math.h> needs to included.Signed-off-by Abdelrahman Youssef <[email protected]>
Thanks,
Ahmad
Quoted 22 lines
--- include/linux/ktime.h | 1 + 1 file changed, 1 insertion(+)include/linux/ktime.h +1
-1@@ -21,6 +21,7 @@#ifndef _LINUX_KTIME_H#define _LINUX_KTIME_H +#include <linux/math.h> #include <linux/time.h> #include <clock.h> #include <linux/bug.h> ---base-commit:
9d47ff66c3892c5a6ddd4704993365a797fbeb68
change-id: 20241017-errors_fixes-81248755b864Best regards,
Signature · 4 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Sascha Hauer
AppliedQuoted 4 lines · On Thu, 17 Oct 2024 02:47:04 +0300, Abdelrahman Youssef via B4 Relay wrote:
I was testing barebox with randconfig, so I got a warning (treated as an error) : implicit declaration of
do_div(). So <linux/math.h> needs to included.
Applied, thanks!
[1/1] include: Include <linux/math.h> to resolve implicit declaration of do_div()
https://git.pengutronix.de/cgit/barebox/commit/?id=cb8767765854 (link may not be stable)
Best regards,
Signature · 1 line
Sascha Hauer <[email protected]>