depot/third_party/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/enable-riscv.patch
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

18 lines
520 B
Diff

diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h
index d875490..ce1f3e8 100644
--- a/webrtc/typedefs.h
+++ b/webrtc/typedefs.h
@@ -26,6 +26,13 @@
#elif defined(__aarch64__)
#define WEBRTC_ARCH_64_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif defined(__riscv) || defined(__riscv__)
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#if __riscv_xlen == 64
+#define WEBRTC_ARCH_64_BITS
+#else
+#define WEBRTC_ARCH_32_BITS
+#endif
#elif defined(_M_IX86) || defined(__i386__)
#define WEBRTC_ARCH_X86_FAMILY
#define WEBRTC_ARCH_X86