Skip to content

Commit fdb44d4

Browse files
pks-tgitster
authored andcommitted
t/clar: fix compatibility with NonStop
The NonStop platform does not have `mkdtemp()` available, which we rely on in `build_sandbox_path()`. Fix this issue by using `mktemp()` and `mkdir()` instead on this platform. This has been cherry-picked from the upstream pull request at [1]. [1]: clar-test/clar#96 Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9e8c389 commit fdb44d4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/unit-tests/clar/clar/sandbox.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ static int build_sandbox_path(void)
120120
if (_mktemp(_clar_path) == NULL)
121121
return -1;
122122

123+
if (mkdir(_clar_path, 0700) != 0)
124+
return -1;
125+
#elif defined(__TANDEM)
126+
if (mktemp(_clar_path) == NULL)
127+
return -1;
128+
123129
if (mkdir(_clar_path, 0700) != 0)
124130
return -1;
125131
#elif defined(_WIN32)

0 commit comments

Comments
 (0)