OSDN Git Service

tests/nouveau/threaded: adapt ioctl signature
authorRoss Burton <ross.burton@intel.com>
Mon, 18 Jun 2018 14:07:03 +0000 (15:07 +0100)
committerPeter Seiderer <ps.report@gmx.net>
Thu, 28 Nov 2019 21:01:34 +0000 (22:01 +0100)
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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
[Taken from https://raw.githubusercontent.com/openembedded/openembedded-core/master/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch]
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
tests/nouveau/threaded.c

index 3669bcd..e1c27c0 100644 (file)
@@ -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;