Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FFI compatibility issue when building on macOS #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Jun 14, 2024

  1. Fix FFI compatibility issue when building on macOS

    When building on an Apple-silicon (ARM) Mac device, the following error
    occurs:
    
    error[E0308]: mismatched types
    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/clamav-async-0.2.0/src/engine.rs:56:36
    |
    |                     CStr::from_ptr(c_virname).to_string_lossy().to_string(),
    |                     -------------- ^^^^^^^^^ expected `*const u8`, found `*const i8`
    |                     |
    |                     arguments to this function are incorrect
    |
    = note: expected raw pointer `*const u8`
    found raw pointer `*const i8`
    note: associated function defined here
    --> /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/ffi/c_str.rs:274:25
    
    The issue is using 'i8' directly rather than the FFI type which is
    c_char.
    micahsnyder committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    a9aba1f View commit details
    Browse the repository at this point in the history
  2. Bump version to 0.2.1

    micahsnyder committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    a7d519a View commit details
    Browse the repository at this point in the history