diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-09-04 16:16:51 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-04 08:41:36 -0700 |
| commit | aa57db2822e585b623c21dc5f38fda272f272849 (patch) | |
| tree | 2d27f25a618b1d3fa71aa66585e25ddddb1d18e9 /t/unit-tests | |
| parent | 9b7caa2809cba618f2af702d35b12bc99535f2b9 (diff) | |
| download | git-aa57db2822e585b623c21dc5f38fda272f272849.tar.gz | |
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>
Diffstat (limited to 't/unit-tests')
| -rw-r--r-- | t/unit-tests/clar/clar/sandbox.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/unit-tests/clar/clar/sandbox.h b/t/unit-tests/clar/clar/sandbox.h index 7c177f3525..e25057b7c4 100644 --- a/t/unit-tests/clar/clar/sandbox.h +++ b/t/unit-tests/clar/clar/sandbox.h @@ -122,6 +122,12 @@ static int build_sandbox_path(void) 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) if (_mktemp_s(_clar_path, sizeof(_clar_path)) != 0) return -1; |
