eal: restore some needed header includes

Message ID 20220923141210.60727-1-Andrew.Boyer@amd.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series eal: restore some needed header includes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

Andrew Boyer Sept. 23, 2022, 2:12 p.m. UTC
  These are necessary to build when HPET is enabled.

Fixes: 2ff3976e677c ("eal: remove unneeded header includes")
Cc: sean.morrissey@intel.com

Signed-off-by: Andrew Boyer <Andrew.Boyer@amd.com>
---
 lib/eal/linux/eal_timer.c | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Ferruh Yigit Sept. 23, 2022, 4:40 p.m. UTC | #1
On 9/23/2022 3:12 PM, Andrew Boyer wrote:
> These are necessary to build when HPET is enabled.
> 
> Fixes: 2ff3976e677c ("eal: remove unneeded header includes")
> Cc: sean.morrissey@intel.com
> 
> Signed-off-by: Andrew Boyer <Andrew.Boyer@amd.com>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
  
Thomas Monjalon Sept. 28, 2022, 11:21 a.m. UTC | #2
23/09/2022 18:40, Ferruh Yigit:
> On 9/23/2022 3:12 PM, Andrew Boyer wrote:
> > These are necessary to build when HPET is enabled.
> > 
> > Fixes: 2ff3976e677c ("eal: remove unneeded header includes")
> > Cc: sean.morrissey@intel.com
> > 
> > Signed-off-by: Andrew Boyer <Andrew.Boyer@amd.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

+Cc stable

Applied, thanks.
  

Patch

diff --git a/lib/eal/linux/eal_timer.c b/lib/eal/linux/eal_timer.c
index 620baf038d..95c8cca992 100644
--- a/lib/eal/linux/eal_timer.c
+++ b/lib/eal/linux/eal_timer.c
@@ -5,6 +5,12 @@ 
 
 #include <stdio.h>
 #include <stdint.h>
+#ifdef RTE_LIBEAL_USE_HPET
+#include <fcntl.h>
+#include <inttypes.h>
+#include <sys/mman.h>
+#include <unistd.h>
+#endif
 
 #include <rte_common.h>
 #include <rte_cycles.h>