diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:21 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:21 +0000 |
commit | 7e7b6700743285c0af506ac6299ddf82ebd434b9 (patch) | |
tree | 578d2ea1868b77f3dff145df7f8f3fe73272c09e /lib/Fuzzer/FuzzerIOPosix.cpp | |
parent | 4b570baa7e867c652fa7d690585098278082fae9 (diff) |
Diffstat (limited to 'lib/Fuzzer/FuzzerIOPosix.cpp')
-rw-r--r-- | lib/Fuzzer/FuzzerIOPosix.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Fuzzer/FuzzerIOPosix.cpp b/lib/Fuzzer/FuzzerIOPosix.cpp index 720bc1304594..6d8edf6ff538 100644 --- a/lib/Fuzzer/FuzzerIOPosix.cpp +++ b/lib/Fuzzer/FuzzerIOPosix.cpp @@ -83,6 +83,12 @@ std::string DirName(const std::string &FileName) { return Res; } +std::string TmpDir() { + if (auto Env = getenv("TMPDIR")) + return Env; + return "/tmp"; +} + } // namespace fuzzer #endif // LIBFUZZER_POSIX |