Skip to content

Commit

Permalink
detector
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra committed Jul 14, 2024
1 parent 3da85c0 commit ef46dc1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/glibc-detectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- { name: aarch64, target: aarch64-unknown-linux-gnu }
- { name: armv7l, target: arm-unknown-linux-gnueabi }
- { name: ppc64, target: powerpc64-unknown-linux-gnu }
- { name: ppcle64, target: powerpc64le-unknown-linux-gnu }
- { name: ppc64le, target: powerpc64le-unknown-linux-gnu }
# - { name: s390x, target: s390x-unknown-linux-gnu }
steps:
- name: Checkout source code
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub fn glibc_version() -> Option<(u32, u32)> {

Check warning on line 121 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Format and Lint

Diff in /home/runner/work/libc-detector/libc-detector/src/lib.rs
/// Detect the current version of `musl` `libc` by inspecting the `/lib/ld-musl-*.so.1` loaders.
pub fn musl_libc_version() -> Option<(u32, u32)> {
for arch in ["x86_64", "aarch64", "i386", "armhf", "powerpc64le", "s390x"] {
for arch in ["x86_64", "aarch64", "i386", "armhf", "arm", "powerpc64le", "s390x"] {
let loader = PathBuf::from(format!("/lib/ld-musl-{arch}.so.1"));
if !loader.exists() {
continue;
Expand Down
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {

Check warning on line 1 in src/main.rs

View workflow job for this annotation

GitHub Actions / Format and Lint

Diff in /home/runner/work/libc-detector/libc-detector/src/main.rs
println!("{:?}", libc_detector::libc_version());
}

0 comments on commit ef46dc1

Please sign in to comment.