[Concept,01/33] linux/sort.h: Fix qsort implicit declaration warning

Message ID 20260121220857.2137568-2-sjg@u-boot.org
State New
Headers
Series Reorganise ext4l compatibility stubs |

Commit Message

Simon Glass Jan. 21, 2026, 10:08 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Include <sort.h> instead of <stdlib.h> to get the proper qsort
declaration. U-Boot's stdlib.h does not declare qsort, but sort.h does.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 include/linux/sort.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/include/linux/sort.h b/include/linux/sort.h
index dc222d8dc89..f131be8d48c 100644
--- a/include/linux/sort.h
+++ b/include/linux/sort.h
@@ -6,7 +6,7 @@ 
 #define _LINUX_SORT_H
 
 #include <linux/types.h>
-#include <stdlib.h>
+#include <sort.h>
 
 typedef int (*cmp_func_t)(const void *, const void *);