always include <fcntl.h>

4a233824c4 fixed issue for Raspberry Pi on Linux, but broke compilation on Mac.
Fixing it by always including <fcntl.h>.
This commit is contained in:
mvp
2024-10-13 11:22:31 -07:00
parent 4a233824c4
commit 302b3c0c77

View File

@@ -18,6 +18,7 @@
#include <getopt.h>
#include <errno.h>
#include <ctype.h>
#include <fcntl.h>
#if defined(_WIN32)
#include <windows.h>
@@ -43,9 +44,6 @@
#include <time.h> /* for nanosleep */
#endif
#if defined(__gnu_linux__) || defined(__linux__)
#include <fcntl.h> /* for open() / O_WRONLY */
#endif
/* cross-platform sleep function */