drivers: nsos: fcntl: prefer Zephyr-specific macros over libc

Definitions of fcntl flags are different between native libc and Zephyr. In
order to correctly map those values to the host, include Zephyr's fcntl.h
header, instead of the one bundled with libc.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This commit is contained in:
Marcin Niestroj 2024-05-09 13:18:20 +02:00 committed by Carles Cufí
parent 557418ace6
commit 3111261940

View file

@ -16,7 +16,14 @@
* symbols.
*/
/*
* When building for Zephyr, use Zephyr specific fcntl definitions.
*/
#ifdef __ZEPHYR__
#include <zephyr/posix/fcntl.h>
#else
#include <fcntl.h>
#endif
#include "nsos_errno.h"
#include "nsos_fcntl.h"