GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

feld (feld@friedcheese.us)'s status on Friday, 20-Jun-2025 05:56:22 JST

  1. Embed this notice
    feld (feld@friedcheese.us)'s status on Friday, 20-Jun-2025 05:56:22 JST feld feld
    in reply to
    • feld
    • Johnny Peligro
    @mischievoustomato my entire claude prompt was

    When I try to compile this on aarch64, I get the following error:

    error[E0308]: mismatched types
    --> src/interface/unix.rs:232:28
    |
    232 | let nlen: i8 = (*sa).sa_data[3];
    | -- ^^^^^^^^^^^^^^^^ expected `i8`, found `u8`
    | |
    | expected due to this
    |
    help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit
    |
    232 | let nlen: i8 = (*sa).sa_data[3].try_into().unwrap();
    | ++++++++++++++++++++

    error[E0308]: mismatched types
    --> src/interface/unix.rs:233:28
    |
    233 | let alen: i8 = (*sa).sa_data[4];
    | -- ^^^^^^^^^^^^^^^^ expected `i8`, found `u8`
    | |
    | expected due to this
    |
    help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit
    |
    233 | let alen: i8 = (*sa).sa_data[4].try_into().unwrap();
    | ++++++++++++++++++++

    For more information about this error, try `rustc --explain E0308`.
    error: could not compile `netdev` (lib) due to 2 previous errors


    I believe this is due to arm defining char as unsigned: @https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#10arm-c-and-c-language-mappings

    how would you fix this while retaining support for all the existing architectures/targets?



    and like magic, it fixed it perfectly without me needing to spend a couple hours reading Rust 101
    In conversation about 5 days ago from gnusocial.jp permalink

Feeds

  • Activity Streams
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.