Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Devoogdt <thomas@devoogdt.com>
To: buildroot@buildroot.org
Cc: Adrian Perez de Castro <aperez@igalia.com>,
	Bernd Kuhls <bernd@kuhls.net>,
	Thomas Devoogdt <thomas@devoogdt.com>,
	Romain Naour <romain.naour@gmail.com>
Subject: [Buildroot] [PATCH v3 2/4] package/x11r7/xlib_libxshmfence: fix build on riscv32
Date: Tue, 16 Apr 2024 20:42:07 +0200	[thread overview]
Message-ID: <20240416184209.2621561-2-thomas@devoogdt.com> (raw)
In-Reply-To: <20240416184209.2621561-1-thomas@devoogdt.com>

In preparation to revert e39ad96136a8c340b3aea6b036024e28f14584f3,
and (partial) 26642e4cc09666110d5105e7867579a0e48cfa09.

xshmfence_futex.h: In function 'sys_futex':
xshmfence_futex.h:58:24: error: 'SYS_futex' undeclared (first use in this function); did you mean 'sys_futex'?
   58 |         return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
      |                        ^~~~~~~~~
      |                        sys_futex

Fixes:
 - https://gitlab.com/buildroot.org/buildroot/-/commit/e39ad96136a8c340b3aea6b036024e28f14584f3

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
---
v2: n/a
v3: n/a
---
 ...tex.h-fix-build-on-32-bit-architectu.patch | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/x11r7/xlib_libxshmfence/0001-src-xshmfence_futex.h-fix-build-on-32-bit-architectu.patch

diff --git a/package/x11r7/xlib_libxshmfence/0001-src-xshmfence_futex.h-fix-build-on-32-bit-architectu.patch b/package/x11r7/xlib_libxshmfence/0001-src-xshmfence_futex.h-fix-build-on-32-bit-architectu.patch
new file mode 100644
index 0000000000..f4ef558615
--- /dev/null
+++ b/package/x11r7/xlib_libxshmfence/0001-src-xshmfence_futex.h-fix-build-on-32-bit-architectu.patch
@@ -0,0 +1,46 @@
+From 4fca45a71f08a5bebd12d39c85f49e0b0e4426bf Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <thomas@devoogdt.com>
+Date: Fri, 5 Apr 2024 10:45:15 +0200
+Subject: [PATCH] src/xshmfence_futex.h: fix build on 32-bit architectures
+ using 64-bit time_t
+
+Fix the following build failure on 32-bit architectures using 64-bit
+time_t (e.g. riscv32):
+
+xshmfence_futex.h: In function 'sys_futex':
+xshmfence_futex.h:58:24: error: 'SYS_futex' undeclared (first use in this function); did you mean 'sys_futex'?
+   58 |         return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
+      |                        ^~~~~~~~~
+      |                        sys_futex
+
+Similar to:
+https://gitlab.freedesktop.org/mesa/mesa/-/commit/7d87478124061915582412ba410759afe863d679
+
+Fixes:
+https://gitlab.com/buildroot.org/buildroot/-/commit/e39ad96136a8c340b3aea6b036024e28f14584f3
+
+Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
+Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/merge_requests/8>
+Upstream: https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/commit/4fca45a71f08a5bebd12d39c85f49e0b0e4426bf
+---
+ src/xshmfence_futex.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/xshmfence_futex.h b/src/xshmfence_futex.h
+index 673ac0e..4476038 100644
+--- a/src/xshmfence_futex.h
++++ b/src/xshmfence_futex.h
+@@ -53,6 +53,10 @@ static inline int futex_wait(int32_t *addr, int32_t value) {
+ #include <sys/time.h>
+ #include <sys/syscall.h>
+ 
++#ifndef SYS_futex
++#define SYS_futex SYS_futex_time64
++#endif
++
+ static inline long sys_futex(void *addr1, int op, int val1, struct timespec *timeout, void *addr2, int val3)
+ {
+ 	return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
+-- 
+2.34.1
+
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-04-16 18:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 18:39 [Buildroot] [PATCH v1 1/2] package/ruby: add host psych (yaml) support Thomas Devoogdt
2024-04-01 18:39 ` [Buildroot] [PATCH v1 2/2] package/webkitgtk: bump to 2.44.0 Thomas Devoogdt
2024-04-03 17:14   ` [Buildroot] [PATCH v2 1/2] package/ruby: add host psych (yaml) support Thomas Devoogdt
2024-04-03 17:14     ` [Buildroot] [PATCH v2 2/2] package/webkitgtk: bump to 2.44.0 Thomas Devoogdt
2024-04-03 22:33       ` Adrian Perez de Castro
2024-04-12  7:45         ` Adrian Perez de Castro
2024-04-12 16:02           ` Thomas Devoogdt
2024-04-16 18:42             ` [Buildroot] [PATCH v3 1/4] package/ruby: add host psych (yaml) support Thomas Devoogdt
2024-04-16 18:42               ` Thomas Devoogdt [this message]
2024-04-16 18:42               ` [Buildroot] [PATCH v3 3/4] Revert "package/x11r7/xlib_libxshmfence: disable on riscv32" Thomas Devoogdt
2024-04-16 18:42               ` [Buildroot] [PATCH v3 4/4] package/webkitgtk: bump to 2.44.1 Thomas Devoogdt
2024-05-17 14:27               ` [Buildroot] [PATCH v3 1/4] package/ruby: add host psych (yaml) support Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240416184209.2621561-2-thomas@devoogdt.com \
    --to=thomas@devoogdt.com \
    --cc=aperez@igalia.com \
    --cc=bernd@kuhls.net \
    --cc=buildroot@buildroot.org \
    --cc=romain.naour@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox