1 Star 0 Fork 35

李恬/hadoop

forked from src-openEuler/hadoop 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
03-Fix-build-on-riscv.patch 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
Dingli Zhang 提交于 2024-05-25 06:07 . Fix build on riscv64
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h
index 000c4b91..70e94487 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h
@@ -99,7 +99,7 @@ inline void simple_memcpy(void * dest, const void * src, size_t len) {
inline uint32_t bswap(uint32_t val) {
#ifdef __aarch64__
__asm__("rev %w[dst], %w[src]" : [dst]"=r"(val) : [src]"r"(val));
-#elif defined(__ppc64__)||(__PPC64__)||(__powerpc64__)
+#elif defined(__ppc64__)||(__PPC64__)||(__powerpc64__)||(__riscv)
return __builtin_bswap32(val);
#else
__asm__("bswap %0" : "=r" (val) : "0" (val));
@@ -110,7 +110,7 @@ inline uint32_t bswap(uint32_t val) {
inline uint64_t bswap64(uint64_t val) {
#ifdef __aarch64__
__asm__("rev %[dst], %[src]" : [dst]"=r"(val) : [src]"r"(val));
-#elif defined(__ppc64__)||(__PPC64__)||(__powerpc64__)
+#elif defined(__ppc64__)||(__PPC64__)||(__powerpc64__)||(__riscv)
return __builtin_bswap64(val);
#else
#ifdef __X64
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/litian_code/hadoop.git
git@gitee.com:litian_code/hadoop.git
litian_code
hadoop
hadoop
master

搜索帮助