1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-12 03:00:28 +00:00

Merge from src:

lld: accept EINVAL to indicate posix_fallocate is unsupported

As of r325320 posix_fallocate on a ZFS filesystem returns EINVAL to
indicate that the operation is not supported. (I think this is a strange
choice of errno on the part of POSIX.)

PR:		223383, 223440
Reported by:	Mark Millard
This commit is contained in:
Brooks Davis 2017-11-12 09:09:35 +00:00
parent 83768f420a
commit 14630d4c2d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=454025
2 changed files with 12 additions and 1 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= llvm
DISTVERSION= 5.0.0
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR}
PKGNAMESUFFIX= ${LLVM_SUFFIX}

View File

@ -0,0 +1,11 @@
--- lib/Support/Unix/Path.inc.orig
+++ lib/Support/Unix/Path.inc
@@ -427,7 +427,7 @@
// 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)) {
- if (Err != EOPNOTSUPP)
+ if (Err != EINVAL && Err != EOPNOTSUPP)
return std::error_code(Err, std::generic_category());
}
#endif