Skip to content

Commit ec70f94

Browse files
Merge pull request #1671 from Glavo/riscv
Add isRISCV method to Platform class
2 parents 4aa8155 + aada5c9 commit ec70f94

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Next Release (5.18.0)
77

88
Features
99
--------
10+
* [#1671](https://github.com/java-native-access/jna/pull/1671): Add `isRISCV` to `c.s.j.Platform` - [@Glavo](https://github.com/Glavo).
1011

1112
Bug Fixes
1213
---------

src/com/sun/jna/Platform.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ public static final boolean isLoongArch() {
246246
return ARCH.startsWith("loongarch");
247247
}
248248

249+
public static final boolean isRISCV() {
250+
return ARCH.startsWith("riscv");
251+
}
252+
249253
static String getCanonicalArchitecture(String arch, int platform) {
250254
arch = arch.toLowerCase().trim();
251255
if ("powerpc".equals(arch)) {

0 commit comments

Comments
 (0)