FreeBSD Bugzilla – Attachment 188691 Details for
Bug 224226
graphics/wayland: re-enable posix_fallocate()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v0
wayland.posix_fallocate.diff (text/plain), 2.52 KB, created by
Jan Beich
on 2017-12-10 19:02:46 UTC
(
hide
)
Description:
v0
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2017-12-10 19:02:46 UTC
Size:
2.52 KB
patch
obsolete
>From 6e2eebf464a76f6a0bd6da489bd0425873956eed Mon Sep 17 00:00:00 2001 >From: Jan Beich <jbeich@FreeBSD.org> >Date: Sun, 10 Dec 2017 18:47:02 +0000 >Subject: [PATCH] graphics/wayland: re-enable posix_fallocate() > >PR: 224226 >Tested by: ? >Approved by: ? >--- > graphics/wayland/Makefile | 2 +- > .../wayland/files/patch-cursor_os-compatibility.c | 23 ++++++++++++++++++++++ > .../wayland/files/patch-cursor_wayland-cursor.c | 11 +++++++++++ > 3 files changed, 35 insertions(+), 1 deletion(-) > create mode 100644 graphics/wayland/files/patch-cursor_os-compatibility.c > create mode 100644 graphics/wayland/files/patch-cursor_wayland-cursor.c > >diff --git a/graphics/wayland/Makefile b/graphics/wayland/Makefile >index 81b030775a5a..4be7cee349d5 100644 >--- a/graphics/wayland/Makefile >+++ b/graphics/wayland/Makefile >@@ -3,6 +3,7 @@ > > PORTNAME= wayland > PORTVERSION= 1.14.0 >+PORTREVISION= 1 > CATEGORIES= graphics wayland > MASTER_SITES= http://wayland.freedesktop.org/releases/ > >@@ -25,7 +26,6 @@ USE_GNOME= libxslt:build > USE_LDCONFIG= yes > GNU_CONFIGURE= yes > CONFIGURE_ARGS= --disable-documentation >-CONFIGURE_ENV= ac_cv_func_posix_fallocate=no # EINVAL for many FS on 12.0 > INSTALL_TARGET= install-strip > > .include <bsd.port.mk> >diff --git a/graphics/wayland/files/patch-cursor_os-compatibility.c b/graphics/wayland/files/patch-cursor_os-compatibility.c >new file mode 100644 >index 000000000000..e99f32142ea4 >--- /dev/null >+++ b/graphics/wayland/files/patch-cursor_os-compatibility.c >@@ -0,0 +1,23 @@ >+--- cursor/os-compatibility.c.orig 2017-08-08 18:20:52 UTC >++++ cursor/os-compatibility.c >+@@ -131,18 +131,17 @@ os_create_anonymous_file(off_t size) >+ >+ #ifdef HAVE_POSIX_FALLOCATE >+ ret = posix_fallocate(fd, 0, size); >+- if (ret != 0) { >++ if (ret != EINVAL && ret != EOPNOTSUPP) { >+ close(fd); >+ errno = ret; >+ return -1; >+ } >+-#else >++#endif >+ ret = ftruncate(fd, size); >+ if (ret < 0) { >+ close(fd); >+ return -1; >+ } >+-#endif >+ >+ return fd; >+ } >diff --git a/graphics/wayland/files/patch-cursor_wayland-cursor.c b/graphics/wayland/files/patch-cursor_wayland-cursor.c >new file mode 100644 >index 000000000000..d9916ecaae27 >--- /dev/null >+++ b/graphics/wayland/files/patch-cursor_wayland-cursor.c >@@ -0,0 +1,11 @@ >+--- cursor/wayland-cursor.c.orig 2017-08-08 18:20:52 UTC >++++ cursor/wayland-cursor.c >+@@ -88,7 +88,7 @@ shm_pool_resize(struct shm_pool *pool, int size) >+ >+ #ifdef HAVE_POSIX_FALLOCATE >+ errno = posix_fallocate(pool->fd, 0, size); >+- if (errno != 0) >++ if (errno != EINVAL && errno != EOPNOTSUPP) >+ return 0; >+ #endif >+
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
Flags:
jbeich
:
maintainer-approval?
(
x11
)
jbeich
:
maintainer-approval?
(
val
)
Actions:
View
|
Diff
Attachments on
bug 224226
: 188691