diff options
author | Vinson Lee <[email protected]> | 2017-11-28 23:16:58 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2017-11-30 01:36:46 -0800 |
commit | 8c1e4b1afc8d396ccf99c725c59b29a9aa305557 (patch) | |
tree | 3bd90a7b061103b8263a33dd9138f1bec52fd8c7 /src | |
parent | 8620f7ebbc763dc1bbbc825d31cacfdd84433e05 (diff) |
anv: Check if memfd_create is already defined.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103909
Signed-off-by: Vinson Lee <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_allocator.c | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_gem_stubs.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 8ed32b3c673..33bd3c68c55 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -109,11 +109,13 @@ struct anv_mmap_cleanup { #define ANV_MMAP_CLEANUP_INIT ((struct anv_mmap_cleanup){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) diff --git a/src/intel/vulkan/anv_gem_stubs.c b/src/intel/vulkan/anv_gem_stubs.c index 02527b5fcd8..26eb5c8a610 100644 --- a/src/intel/vulkan/anv_gem_stubs.c +++ b/src/intel/vulkan/anv_gem_stubs.c @@ -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) |