Skip to content

Update ENODATA internal sentinel to use a value found on all platforms #909

Open

Description

@paleolimbot

In #906 , we fixed a compile error where ENODATA wasn't defined on BSD platforms. I didn't know that ENODATA was problematic at the time, but this internal sentinel is not ideal as it's not actually part of the standard and is equivalent with ENOATTR in some places.

The internal use of this is OK with any integer value; however, there are potentially a few code paths used by advanced users of the low-level decoder that could leak this value to users, and if it's returned to an end user it should be a valid errno value. We can either pick a new sentinel or rewrite that code path to avoid using a sentinel at all or ensure that any internal sentinel doesn't get returned to end users.

Activity

  1. michael-o commented on Jul 22, 2026

    @michael-o
    Member

    Just to interate on what I have proposed: Use errno.h for low level (libc), I guess. My proposal was is to look into how curl does, the have their own macros: CURL_E...

    See: https://github.com/curl/curl/blob/057b25135848575d6f62eed97874a8d71e72af1d/include/curl/curl.h#L518-L648

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions