Subject: Re: [PATCH] wrapper: Fix a errno discrepancy on NetBSD.

From: Collin Funk <[email-masked]>
Date: Fri, 02 May 2025 20:48:24 -0700

Hi Brian,

"brian m. carlson" <[email-masked]> writes:

> I suspect we'll also hit this on FreeBSD, which has a similar issue in
> that it returns `EMLINK` instead of `ELOOP`.

Good memory. I can confirm that FreeBSD fails in the same place with a
message for EMLINK. I'll write another patch for that.

> I do wish these two OSes would provide an appropriate POSIX-compatible
> `open` call when set with `_POSIX_SOURCE`, since this is one of the
> biggest portability problems with them.

It is documented in their man pages, so I assume it is intentional. But
I don't see any benefit to differing from POSIX here. I'll see if I can
find any discussion before I submit a bug report.

Collin