Skip to content

Commit 55f230f

Browse files
authored
[z.OS] fix strnlen() usage in Context.cpp available on z/OS (llvm#160339)
On z/OS `strnlen()` is not available by default so we use the wrapper header `zOSSupport.h` to make it visible. This will fix the following error: ``` clang/lib/AST/ByteCode/Context.cpp:250:16: error: use of undeclared identifier 'strnlen' 250 | Result = strnlen(reinterpret_cast<const char *>(Ptr.getRawAddress()), N); | ^~~~~~~ 1 error generated. ```
1 parent 31941d6 commit 55f230f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/lib/AST/ByteCode/Context.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "clang/AST/ASTLambda.h"
1919
#include "clang/AST/Expr.h"
2020
#include "clang/Basic/TargetInfo.h"
21+
#include "llvm/Support/SystemZ/zOSSupport.h"
2122

2223
using namespace clang;
2324
using namespace clang::interp;

0 commit comments

Comments
 (0)