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

unix: Fix feature(unix_socket_ancillary_data) on macos and other BSDs #83374

Merged
merged 1 commit into from
Mar 30, 2021

Commits on Mar 26, 2021

  1. unix: Fix feature(unix_socket_ancillary_data) on macos and other BSDs

    This adds support for CMSG handling on macOS and fixes it on OpenBSD
    and other BSDs.
    
    When traversing the CMSG list, the previous code had an exception for
    Android where the next element after the last pointer could point to
    the first pointer instead of NULL.  This is actually not specific to
    Android: the `libc::CMSG_NXTHDR` implementation for Linux and
    emscripten have a special case to return NULL when the length of the
    previous element is zero; most other implementations simply return the
    previous element plus a zero offset in this case.
    
    This MR additionally adds `SocketAncillary::is_empty` because clippy
    is right that it should be added.
    reyk committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    3d6bd87 View commit details
    Browse the repository at this point in the history