Skip to content

Commit c79bc0a

Browse files
christopherlmunoztungld
authored andcommitted
adding __errno_location call for mvs (onnx#3099)
Signed-off-by: Christopher Munoz <[email protected]>
1 parent 4bb8153 commit c79bc0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Runtime/OMTensor.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
#include "src/Support/SmallFPConversion.h"
4949
#endif
5050

51-
#if defined(__APPLE__)
51+
#if defined(__APPLE__) || defined(__MVS__)
5252
// __errno_location() is called from krnl::emitErrNo() to set errno in
53-
// generated llvm IR, but it somehow doesn't come out of the box on MacOS.
53+
// generated llvm IR, but it somehow doesn't come out of the box on MacOS or MVS.
5454
int *__attribute__((__weak__)) __errno_location(void) { return &errno; }
5555
#endif
5656

0 commit comments

Comments
 (0)