[PATCH 2/2] tools/getdelays: use the static UAPI headers from tools/include/uapi

Thomas Weißschuh posted 2 patches 1 month ago
[PATCH 2/2] tools/getdelays: use the static UAPI headers from tools/include/uapi
Posted by Thomas Weißschuh 1 month ago
The include directory ../../usr/include is only present if an in-tree
kernel build with CONFIG_HEADERS_INSTALL was done before.
Otherwise the system UAPI headers are used, which most likely are not
the most recent ones.

To make sure to always have access to up-to-date UAPI headers,
use the static copy in tools/include/uapi.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202603062103.Z5fecwZD-lkp@intel.com/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 tools/accounting/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/accounting/Makefile b/tools/accounting/Makefile
index 20bbd461515e..007c0bb8cbbb 100644
--- a/tools/accounting/Makefile
+++ b/tools/accounting/Makefile
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 CC := $(CROSS_COMPILE)gcc
-CFLAGS := -I../../usr/include
+CFLAGS := -I../include/uapi/
 
 PROGS := getdelays procacct delaytop
 

-- 
2.53.0