67 lines
1.7 KiB
Diff
67 lines
1.7 KiB
Diff
Do not redefine ioctl() and close(), conflicts with the libc declarations.
|
|
Fixes musl build.
|
|
|
|
--xtraeme
|
|
|
|
--- benchmarks/gem_exec_tracer.c.orig 2015-09-12 08:46:22.024640552 +0200
|
|
+++ benchmarks/gem_exec_tracer.c 2015-09-12 08:46:51.737733668 +0200
|
|
@@ -162,7 +162,7 @@ trace_del(uint32_t handle)
|
|
}
|
|
|
|
int
|
|
-close(int fd)
|
|
+myclose(int fd)
|
|
{
|
|
if (fd == drm_fd)
|
|
drm_fd = -1;
|
|
@@ -200,7 +200,7 @@ static int is_i915(int fd)
|
|
}
|
|
|
|
int
|
|
-ioctl(int fd, unsigned long request, ...)
|
|
+myioctl(int fd, unsigned long request, ...)
|
|
{
|
|
va_list args;
|
|
void *argp;
|
|
@@ -281,8 +281,8 @@ ioctl(int fd, unsigned long request, ...
|
|
static void __attribute__ ((constructor))
|
|
init(void)
|
|
{
|
|
- libc_close = dlsym(RTLD_NEXT, "close");
|
|
- libc_ioctl = dlsym(RTLD_NEXT, "ioctl");
|
|
+ libc_close = dlsym(RTLD_NEXT, "myclose");
|
|
+ libc_ioctl = dlsym(RTLD_NEXT, "myioctl");
|
|
fail_if(libc_close == NULL || libc_ioctl == NULL,
|
|
"failed to get libc ioctl or close\n");
|
|
}
|
|
--- tools/aubdump.c.orig 2015-09-12 08:45:16.921302516 +0200
|
|
+++ tools/aubdump.c 2015-09-12 08:45:51.750828746 +0200
|
|
@@ -398,7 +398,7 @@ remove_bo(int handle)
|
|
}
|
|
|
|
int
|
|
-close(int fd)
|
|
+myclose(int fd)
|
|
{
|
|
if (fd == drm_fd)
|
|
drm_fd = -1;
|
|
@@ -407,7 +407,7 @@ close(int fd)
|
|
}
|
|
|
|
int
|
|
-ioctl(int fd, unsigned long request, ...)
|
|
+myioctl(int fd, unsigned long request, ...)
|
|
{
|
|
va_list args;
|
|
void *argp;
|
|
@@ -532,8 +532,8 @@ init(void)
|
|
{
|
|
const char *args = getenv("INTEL_AUBDUMP_ARGS");
|
|
|
|
- libc_close = dlsym(RTLD_NEXT, "close");
|
|
- libc_ioctl = dlsym(RTLD_NEXT, "ioctl");
|
|
+ libc_close = dlsym(RTLD_NEXT, "myclose");
|
|
+ libc_ioctl = dlsym(RTLD_NEXT, "myioctl");
|
|
fail_if(libc_close == NULL || libc_ioctl == NULL,
|
|
"intel_aubdump: failed to get libc ioctl or close\n");
|
|
|