]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
vxworks: libstdc++: include ioLib.h for dup()
authorAlexandre Oliva <oliva@adacore.com>
Sat, 10 May 2025 04:26:38 +0000 (01:26 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Sat, 10 May 2025 04:26:38 +0000 (01:26 -0300)
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.

libstdc++-v3/src/c++23/print.cc

index 8ba7140596726f7cfe5f561d7fff42f9b6a9fc4a..f34369950096191cecf4713e6b0b840225e730bb 100644 (file)
 # include <unistd.h>  // isatty
 #endif
 
+#ifdef __VXWORKS__
+#include <ioLib.h>
+#endif
+
 namespace std _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION