mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 09:00:08 +01:00
anv: Check if memfd_create is already defined.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103909
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
(cherry picked from commit 8c1e4b1afc)
[Emil Velikov: drop NA hunks]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
configure.ac
meson.build
src/intel/vulkan/anv_allocator.c
This commit is contained in:
parent
4e84aaa906
commit
4eae5b39ee
3 changed files with 5 additions and 0 deletions
|
|
@ -793,6 +793,7 @@ AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
|
|||
AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
|
||||
AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
|
||||
AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
|
||||
AC_CHECK_FUNC([memfd_create], [DEFINES="$DEFINES -DHAVE_MEMFD_CREATE"])
|
||||
|
||||
AC_MSG_CHECKING([whether strtod has locale support])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||
|
|
|
|||
|
|
@ -131,11 +131,13 @@ futex_wait(uint32_t *addr, int32_t value)
|
|||
return sys_futex(addr, FUTEX_WAIT, value, NULL, NULL, 0);
|
||||
}
|
||||
|
||||
#ifndef HAVE_MEMFD_CREATE
|
||||
static inline int
|
||||
memfd_create(const char *name, unsigned int flags)
|
||||
{
|
||||
return syscall(SYS_memfd_create, name, flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline uint32_t
|
||||
ilog2_round_up(uint32_t value)
|
||||
|
|
|
|||
|
|
@ -27,11 +27,13 @@
|
|||
|
||||
#include "anv_private.h"
|
||||
|
||||
#ifndef HAVE_MEMFD_CREATE
|
||||
static inline int
|
||||
memfd_create(const char *name, unsigned int flags)
|
||||
{
|
||||
return syscall(SYS_memfd_create, name, flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t
|
||||
anv_gem_create(struct anv_device *device, uint64_t size)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue