summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Coopersmith <[email protected]>2019-10-08 15:36:48 -0700
committerDylan Baker <[email protected]>2019-10-17 09:09:03 -0700
commit9d13289ad4aeea9c3d7afeff2c162688111e9ab7 (patch)
tree9579064f7b8ca641bbf88009f963418117276b23
parent9b49a4ea12f6c50bd10024312a672783d11a4acd (diff)
intel/common: include unistd.h for ioctl() prototype on Solaris
Fixes build errors of: In file included from ../src/intel/vulkan/anv_private.h:48, from ../src/intel/vulkan/genX_blorp_exec.c:26: ../src/intel/common/gen_gem.h: In function ‘gen_ioctl’: ../src/intel/common/gen_gem.h:68:15: error: implicit declaration of function ‘ioctl’ [-Werror=implicit-function-declaration] 68 | ret = ioctl(fd, request, arg); | ^~~~~ In file included from ../include/c11/threads_posix.h:35, from ../include/c11/threads.h:66, from ../src/mesa/main/mtypes.h:39, from ../src/intel/compiler/brw_compiler.h:30, from ../src/intel/vulkan/anv_private.h:51, from ../src/intel/vulkan/genX_blorp_exec.c:26: /usr/include/unistd.h: At top level: /usr/include/unistd.h:471:12: error: conflicting types for ‘ioctl’ 471 | extern int ioctl(int, int, ...); | ^~~~~ /usr/include/unistd.h:471:1: note: a parameter list with an ellipsis can’t match an empty parameter name list declaration 471 | extern int ioctl(int, int, ...); | ^~~~~~ In file included from ../src/intel/vulkan/anv_private.h:48, from ../src/intel/vulkan/genX_blorp_exec.c:26: ../src/intel/common/gen_gem.h:68:15: note: previous implicit declaration of ‘ioctl’ was here 68 | ret = ioctl(fd, request, arg); | ^~~~~ Signed-off-by: Alan Coopersmith <[email protected]> Acked-by: Eric Engestrom <[email protected]> (cherry picked from commit 6804b8e1ff4b62b6685418f773041f10db01f879)
-rw-r--r--src/intel/common/gen_gem.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/intel/common/gen_gem.h b/src/intel/common/gen_gem.h
index c4dda6de657..fc48d54386b 100644
--- a/src/intel/common/gen_gem.h
+++ b/src/intel/common/gen_gem.h
@@ -26,6 +26,7 @@
#include <errno.h>
#include <stdint.h>
+#include <unistd.h>
#include <sys/ioctl.h>
static inline uint64_t