aports/testing/igt-gpu-tools/musl.patch
2023-02-05 15:59:07 +01:00

99 lines
3.3 KiB
Diff

diff --git a/benchmarks/gem_exec_tracer.c b/benchmarks/gem_exec_tracer.c
index 7e86473..fc2dcf2 100644
--- a/benchmarks/gem_exec_tracer.c
+++ b/benchmarks/gem_exec_tracer.c
@@ -271,7 +271,7 @@ static int is_i915(int fd)
}
int
-ioctl(int fd, unsigned long request, ...)
+ioctl(int fd, int request, ...)
{
struct trace *t, **p;
va_list args;
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index e734c87..1360516 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -48,7 +48,6 @@
# ifndef HAVE_GETTID
# define gettid() (pid_t)(syscall(__NR_gettid))
# endif
-# define sigev_notify_thread_id _sigev_un._tid
#endif
/* auxialiary igt helpers from igt_aux.c */
diff --git a/lib/igt_halffloat.c b/lib/igt_halffloat.c
index 08ab05f..7d6a6e6 100644
--- a/lib/igt_halffloat.c
+++ b/lib/igt_halffloat.c
@@ -162,7 +162,7 @@ static inline float _half_to_float(uint16_t val)
return fi.f;
}
-#if defined(__x86_64__) && !defined(__clang__)
+#if defined(__x86_64__) && !defined(__clang__) && defined(__GLIBC__)
#pragma GCC push_options
#pragma GCC target("f16c")
diff --git a/lib/igt_x86.c b/lib/igt_x86.c
index 6ac700d..ddf5edd 100644
--- a/lib/igt_x86.c
+++ b/lib/igt_x86.c
@@ -190,7 +190,7 @@ char *igt_x86_features_to_string(unsigned features, char *line)
}
#endif
-#if defined(__x86_64__) && !defined(__clang__)
+#if defined(__x86_64__) && !defined(__clang__) && defined(__GLIBC__)
#pragma GCC push_options
#pragma GCC target("sse4.1")
#pragma GCC diagnostic ignored "-Wpointer-arith"
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index 2a3fb74..781af5e 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -830,7 +830,7 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
{
int timeline, fence_fd;
void *map;
- const ptrdiff_t PAGE_SIZE = sysconf(_SC_PAGE_SIZE);
+ const ptrdiff_t intelsize = sysconf(_SC_PAGE_SIZE);
uint64_t old_mode_id = pipe->values[IGT_CRTC_MODE_ID];
igt_require_sw_sync();
@@ -838,28 +838,28 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
timeline = sw_sync_timeline_create();
/* invalid out_fence_ptr */
- map = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+ map = mmap(NULL, intelsize, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
igt_assert(map != MAP_FAILED);
igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
- munmap(map, PAGE_SIZE);
+ munmap(map, intelsize);
/* invalid out_fence_ptr */
- map = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+ map = mmap(NULL, intelsize, PROT_EXEC, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
igt_assert(map != MAP_FAILED);
igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
- munmap(map, PAGE_SIZE);
+ munmap(map, intelsize);
/* invalid out_fence_ptr */
- map = mmap(NULL, PAGE_SIZE, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+ map = mmap(NULL, intelsize, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
igt_assert(map != MAP_FAILED);
igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
- munmap(map, PAGE_SIZE);
+ munmap(map, intelsize);
/* valid in fence but not allowed prop on crtc */
fence_fd = sw_sync_timeline_create_fence(timeline, 1);