[gcc(refs/users/aoliva/heads/testme)] vxworks: libstdc++: include ioLib.h for dup()
Alexandre Oliva
aoliva@gcc.gnu.org
Thu May 8 05:26:13 GMT 2025
https://gcc.gnu.org/g:4ae3add0e596776d8084524c48e8d8a60aedf894
commit 4ae3add0e596776d8084524c48e8d8a60aedf894
Author: Alexandre Oliva <oliva@adacore.com>
Date: Thu May 8 02:18:22 2025 -0300
vxworks: libstdc++: include ioLib.h for dup()
vxworks's dup function is not declared in unistd.h, but c++23/print.cc
expects to be able to call it if unistd.h is available. On vxworks,
the function is only declared in ioLib.h, so arrange to include it.
for libstdc++-v3/ChangeLog
* src/c++23/print.cc [__VXWORKS__]: Include ioLib.h.
Diff:
---
libstdc++-v3/src/c++23/print.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libstdc++-v3/src/c++23/print.cc b/libstdc++-v3/src/c++23/print.cc
index 8ba714059672..f34369950096 100644
--- a/libstdc++-v3/src/c++23/print.cc
+++ b/libstdc++-v3/src/c++23/print.cc
@@ -43,6 +43,10 @@
# include <unistd.h> // isatty
#endif
+#ifdef __VXWORKS__
+#include <ioLib.h>
+#endif
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
More information about the Libstdc++-cvs
mailing list