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

LibJS+LibCore: Some BSD Compatibility updates #24273

Merged
merged 4 commits into from
Jun 6, 2024

Commits on Jun 6, 2024

  1. LibJS: Pass -1 as fd when using MAP_ANONYMOUS with mmap

    NetBSD and FreeBSD get upset when we don't set the fd to an invalid
    value when using a non-shared mapping.
    
    Reported-By: Thomas Klausner <wiz@gatalith.at>
    ADKaster committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    3101064 View commit details
    Browse the repository at this point in the history
  2. LibCore: Be more BSD-friendly in Core::Environment

    FreeBSD and NetBSD don't have secure_getenv(3), same as macOS.
    FreeBSD 13 and lower also don't allow setting environ pointers to null.
    
    Co-Authored-By: Robert Clausecker <fuz@FreeBSD.org>
    ADKaster and clausecker committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    880bb5d View commit details
    Browse the repository at this point in the history
  3. Meta: Link librt to LibCoreMinimal on NetBSD

    We were already linking librt to LibCore for shm_open and friends.
    Now that we build the code that uses POSIX shm into LibCoreMinimal, we
    need to link librt into that as well.
    ADKaster committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    04b4c47 View commit details
    Browse the repository at this point in the history
  4. LibCore: Null-check struct addrinfo to avoid freeaddrinfo(NULL)

    On some C libraries, like NetBSD and musl-libc, this under-specified
    edge case results in a crash rather than silently ignoring the null
    pointer.
    ADKaster committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    0b35c7b View commit details
    Browse the repository at this point in the history