DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] eal/windows: define standard file numbers
@ 2024-10-10  9:54 Bruce Richardson
  2024-10-10 10:43 ` Dmitry Kozlyuk
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2024-10-10  9:54 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, ferruh.yigit, thomas, Bruce Richardson,
	Dmitry Kozlyuk, Tyler Retzlaff, Pallavi Kadam

The macros for STD*_FILENO are missing on windows. Add defines for them
to the DPDK-local unistd.h file.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eal/windows/include/unistd.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/eal/windows/include/unistd.h b/lib/eal/windows/include/unistd.h
index 6b33005b24..78150c6480 100644
--- a/lib/eal/windows/include/unistd.h
+++ b/lib/eal/windows/include/unistd.h
@@ -12,4 +12,15 @@
 
 #include <io.h>
 
+/*
+ * Windows appears to be missing STD*_FILENO macros, so define here.
+ * For simplicity, assume that if STDIN_FILENO is missing, all are,
+ * rather than checking each individually.
+ */
+#ifndef STDIN_FILENO
+#define STDIN_FILENO _fileno(stdin)
+#define STDOUT_FILENO _fileno(stdout)
+#define STDERR_FILENO _fileno(stderr)
+#endif
+
 #endif /* _UNISTD_H_ */
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-10 21:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-10  9:54 [PATCH] eal/windows: define standard file numbers Bruce Richardson
2024-10-10 10:43 ` Dmitry Kozlyuk
2024-10-10 11:39   ` Bruce Richardson
2024-10-10 12:33     ` Dmitry Kozlyuk
2024-10-10 21:41       ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).