FreeBSD Bugzilla – Attachment 223946 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]
patch
libxkbcommon-posix-fallocate.patch (text/plain), 1.04 KB, created by
Ghost
on 2021-04-09 14:17:56 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Ghost
Created:
2021-04-09 14:17:56 UTC
Size:
1.04 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..3d9ebccc4 >--- /dev/null >+++ b/x11/libxkbcommon/files/patch-tools_interactive-wayland.c >@@ -0,0 +1,32 @@ >+--- tools/interactive-wayland.c.orig 2021-04-07 16:27:51 UTC >++++ tools/interactive-wayland.c >+@@ -181,20 +181,26 @@ os_create_anonymous_file(off_t size) >+ return -1; >+ >+ #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; >+ } >++ if (ret != 0) >++ ret = ftruncate(fd, size); >+ #else >+ ret = ftruncate(fd, size); >++#endif >+ 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