boost: Fix build on rv32

Define __NR_futex in terms for __NR_futex_time64 for rv32

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2020-04-28 18:37:35 -07:00
parent f59218799a
commit 762911ea2e
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,13 @@
--- a/libs/log/src/event.cpp
+++ b/libs/log/src/event.cpp
@@ -31,6 +31,10 @@
#include <linux/futex.h>
#include <boost/memory_order.hpp>
+#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
+# define __NR_futex __NR_futex_time64
+#endif
+
// Some Android NDKs (Google NDK and older Crystax.NET NDK versions) don't define SYS_futex
#if defined(SYS_futex)
#define BOOST_LOG_SYS_FUTEX SYS_futex

View file

@ -0,0 +1,3 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append_riscv32 = " file://riscv32__NR_futex.patch"