[v5,01/20] eal: include header required for alloca

Message ID 1731026691-1529-2-git-send-email-andremue@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series remove use of VLAs for Windows |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Andre Muezerie Nov. 8, 2024, 12:44 a.m. UTC
From: Tyler Retzlaff <roretzla@linux.microsoft.com>

Include alloca.h for Linux and malloc.h for Windows to get declaration
of alloca().

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/eal/linux/include/rte_os.h   | 1 +
 lib/eal/windows/include/rte_os.h | 1 +
 2 files changed, 2 insertions(+)
  

Patch

diff --git a/lib/eal/linux/include/rte_os.h b/lib/eal/linux/include/rte_os.h
index 35c07c70cb..20eff0409a 100644
--- a/lib/eal/linux/include/rte_os.h
+++ b/lib/eal/linux/include/rte_os.h
@@ -10,6 +10,7 @@ 
  * which is not supported natively or named differently in Linux.
  */
 
+#include <alloca.h>
 #include <sched.h>
 #include <sys/queue.h>
 
diff --git a/lib/eal/windows/include/rte_os.h b/lib/eal/windows/include/rte_os.h
index 9d69467aaa..d09adeb3b4 100644
--- a/lib/eal/windows/include/rte_os.h
+++ b/lib/eal/windows/include/rte_os.h
@@ -13,6 +13,7 @@ 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <malloc.h>
 
 #include <sched.h>