[v4,8/8] eal: add missing include to fix build with musl libc

Message ID 20201105211716.25181-9-ncopa@alpinelinux.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v4,1/8] app/testpmd: fix uint build error with musl libc |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues
ci/travis-robot warning Travis build: failed
ci/iol-testing fail Testing issues

Commit Message

Natanael Copa Nov. 5, 2020, 9:17 p.m. UTC
  Solve the build error with musl libc:

../lib/librte_eal/unix/eal_file.c: In function 'eal_file_open':
../lib/librte_eal/unix/eal_file.c:22:15: error: 'O_RDONLY' undeclared
(first use in this function)
   22 |   sys_flags = O_RDONLY;
      |               ^~~~~~~~

Fixes: 176bb37ca6f3 ("eal: introduce internal wrappers for file operations")
Cc: stable@dpdk.org
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
 lib/librte_eal/unix/eal_file.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/lib/librte_eal/unix/eal_file.c b/lib/librte_eal/unix/eal_file.c
index 1b26475ba..ec554e009 100644
--- a/lib/librte_eal/unix/eal_file.c
+++ b/lib/librte_eal/unix/eal_file.c
@@ -4,6 +4,7 @@ 
 
 #include <sys/file.h>
 #include <sys/mman.h>
+#include <fcntl.h>
 #include <unistd.h>
 
 #include <rte_errno.h>