Skip to content

Commit db2b210

Browse files
authored
Apply fix
1 parent a31b5a1 commit db2b210

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/Interpreter/Compatibility.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#define dup _dup
1515
#define dup2 _dup2
1616
#define close _close
17+
#define fileno _fileno
1718
#endif
1819

1920
#if CLANG_VERSION_MAJOR < 19

lib/Interpreter/CppInterOp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3304,7 +3304,7 @@ namespace Cpp {
33043304
// This seems only neccessary when piping stdout or stderr, but do it
33053305
// for ttys to avoid over complicated code for minimal benefit.
33063306
::fflush(FD == STDOUT_FILENO ? stdout : stderr);
3307-
if (dup2(_fileno(m_TempFile.get()), FD) < 0)
3307+
if (dup2(fileno(m_TempFile.get()), FD) < 0)
33083308
perror("StreamCaptureInfo:");
33093309
}
33103310
StreamCaptureInfo(const StreamCaptureInfo&) = delete;

0 commit comments

Comments
 (0)