33 lines
925 B
Diff
33 lines
925 B
Diff
|
For musl libc instead of including <sys/ioctl.h>, which leads to
|
||
|
an error when redefining ioctl(3) and close(3), just define the
|
||
|
prototype for ioctl().
|
||
|
|
||
|
--- benchmarks/gem_exec_tracer.c 2015-08-17 18:38:30.000000000 +0200
|
||
|
+++ benchmarks/gem_exec_tracer.c 2015-09-13 17:03:34.768431063 +0200
|
||
|
@@ -32,7 +32,11 @@
|
||
|
#include <fcntl.h>
|
||
|
#include <sys/types.h>
|
||
|
#include <sys/stat.h>
|
||
|
+#if defined(__GLIBC__)
|
||
|
#include <sys/ioctl.h>
|
||
|
+#else
|
||
|
+int ioctl(int fd, unsigned long request, ...);
|
||
|
+#endif
|
||
|
#include <unistd.h>
|
||
|
#include <errno.h>
|
||
|
#include <sys/mman.h>
|
||
|
--- tools/aubdump.c 2015-09-08 19:01:19.000000000 +0200
|
||
|
+++ tools/aubdump.c 2015-09-13 17:06:27.850430550 +0200
|
||
|
@@ -32,7 +32,11 @@
|
||
|
#include <fcntl.h>
|
||
|
#include <sys/types.h>
|
||
|
#include <sys/stat.h>
|
||
|
+#if defined(__GLIBC__)
|
||
|
#include <sys/ioctl.h>
|
||
|
+#else
|
||
|
+int ioctl(int fd, unsigned long request, ...);
|
||
|
+#endif
|
||
|
#include <unistd.h>
|
||
|
#include <errno.h>
|
||
|
#include <sys/mman.h>
|