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]: https://github.com/clar-test/clar/pull/96 Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
9b7caa2809
commit
aa57db2822
@ -120,6 +120,12 @@ static int build_sandbox_path(void)
|
||||
if (_mktemp(_clar_path) == NULL)
|
||||
return -1;
|
||||
|
||||
if (mkdir(_clar_path, 0700) != 0)
|
||||
return -1;
|
||||
#elif defined(__TANDEM)
|
||||
if (mktemp(_clar_path) == NULL)
|
||||
return -1;
|
||||
|
||||
if (mkdir(_clar_path, 0700) != 0)
|
||||
return -1;
|
||||
#elif defined(_WIN32)
|
||||
|
Reference in New Issue
Block a user