aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/Unix
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-12-25 22:36:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-05-14 11:44:01 +0000
commit0eae32dcef82f6f06de6419a0d623d7def0cc8f6 (patch)
tree55b7e05be47b835fd137915bee1e64026c35e71c /contrib/llvm-project/llvm/lib/Support/Unix
parent4824e7fd18a1223177218d4aec1b3c6c5c4a444e (diff)
parent77fc4c146f0870ffb09c1afb823ccbe742c5e6ff (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/Unix')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/Unix/Path.inc13
1 files changed, 0 insertions, 13 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/Unix/Path.inc b/contrib/llvm-project/llvm/lib/Support/Unix/Path.inc
index 563f8969e57a..1b33e6a88c6a 100644
--- a/contrib/llvm-project/llvm/lib/Support/Unix/Path.inc
+++ b/contrib/llvm-project/llvm/lib/Support/Unix/Path.inc
@@ -590,19 +590,6 @@ std::error_code rename(const Twine &from, const Twine &to) {
}
std::error_code resize_file(int FD, uint64_t Size) {
-#if defined(HAVE_POSIX_FALLOCATE)
- // If we have posix_fallocate use it. Unlike ftruncate it always allocates
- // space, so we get an error if the disk is full.
- if (int Err = ::posix_fallocate(FD, 0, Size)) {
-#ifdef _AIX
- constexpr int NotSupportedError = ENOTSUP;
-#else
- constexpr int NotSupportedError = EOPNOTSUPP;
-#endif
- if (Err != EINVAL && Err != NotSupportedError)
- return std::error_code(Err, std::generic_category());
- }
-#endif
// Use ftruncate as a fallback. It may or may not allocate space. At least on
// OS X with HFS+ it does.
if (::ftruncate(FD, Size) == -1)