Skip to contentSkip to conversation

tests/nouveau/threaded: adapt ioctl signature

PATCH New Ross Burton 1 participant 1 message Jun 18, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/nouveau/threaded: adapt ioctl signature

POSIX says ioctl() has the signature (int, int, ...) but glibc has decided to use (int, unsigned long int, ...) instead.

Use a #ifdef to adapt the replacement function as appropriate.

---
 tests/nouveau/threaded.c | 4 ++++
 1 file changed, 4 insertions(+)
tests/nouveau/threaded.c +4 -0
index 3669bcd3..e1c27c01 100644
@@ -36,7 +36,11 @@ static int failed;
 
 static int import_fd;
 
+#ifdef __GLIBC__
 int ioctl(int fd, unsigned long request, ...)
+#else
+int ioctl(int fd, int request, ...)
+#endif
 {
 	va_list va;
 	int ret;
Signature · 6 lines
2.11.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel