https://gcc.gnu.org/g:923d57b525f5955d1f49854dbeb320cf6db74e64

commit r16-507-g923d57b525f5955d1f49854dbeb320cf6db74e64
Author: Alexandre Oliva <ol...@adacore.com>
Date:   Sat May 10 01:26:38 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

Reply via email to