Skip to content

Commit

Permalink
Defined __ANDROID_API__ to fix build on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku authored and wez committed Mar 1, 2024
1 parent e57fdc8 commit 5c135f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libssh-rs-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ fn main() {
cfg.define("HAVE_NTOHLL", Some("1"));
cfg.define("HAVE_HTONLL", Some("1"));
}
if target.contains("android") {
cfg.define("__ANDROID_API__", Some("21"));
}

let compiler = cfg.get_compiler();
if compiler.is_like_gnu() || compiler.is_like_clang() {
Expand Down

0 comments on commit 5c135f7

Please sign in to comment.