FreeBSD Bugzilla – Attachment 223954 Details for
Bug 254919
x11/libxkbcommon: fix xkbcli interactive-wayland when posix_fallocate() isn't supported by fs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v2
libxkbcommon-posix-fallocate.patch (text/plain), 1.05 KB, created by
Ghost
on 2021-04-09 20:23:55 UTC
(
hide
)
Description:
v2
Filename:
MIME Type:
Creator:
Ghost
Created:
2021-04-09 20:23:55 UTC
Size:
1.05 KB
patch
obsolete
>diff --git a/x11/libxkbcommon/files/patch-tools_interactive-wayland.c b/x11/libxkbcommon/files/patch-tools_interactive-wayland.c >new file mode 100644 >index 000000000..48b4d288a >--- /dev/null >+++ b/x11/libxkbcommon/files/patch-tools_interactive-wayland.c >@@ -0,0 +1,33 @@ >+--- tools/interactive-wayland.c.orig 2021-04-07 16:27:51 UTC >++++ tools/interactive-wayland.c >+@@ -180,21 +180,25 @@ os_create_anonymous_file(off_t size) >+ if (fd < 0) >+ return -1; >+ >+-#ifdef HAVE_POSIX_FALLOCATE >++#ifdef HAVE_POSIX_FALLOCATE >++ /* Filesystems that do not support posix_fallocate() >++ * will return EINVAL or EOPNOTSUPP, fallback to >++ * ftruncate() then >++ */ >+ ret = posix_fallocate(fd, 0, size); >+- if (ret != 0) { >++ if (ret != 0 && ret != EINVAL && ret != EOPNOTSUPP) { >+ close(fd); >+ errno = ret; >+ return -1; >+ } >+-#else >++ if (ret != 0) >++#endif >+ ret = ftruncate(fd, size); >+ if (ret < 0) { >+ close(fd); >++ errno = ret; >+ return -1; >+ } >+-#endif >+- >+ return fd; >+ } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 254919
:
223946
|
223954
|
224105