Download raw body.
-portable: add a wrapper for open() on FreeBSD
Stefan Sperling:
> +int
> +got_err_open_nofollow_on_symlink(void)
> +{
> + /*
> + * Check whether open(2) with O_NOFOLLOW failed on a symlink.
> + * Posix mandates ELOOP and OpenBSD follows it. Others return
> + * different error codes. We carry this workaround to help the
> + * portable version a little.
> + */
> + return (errno == ELOOP || errno == EMLINK || errno == EFTYPE);
> +}
This is in itself a portability problem. I don't think Linux even
has EFTYPE.
We'll need to do something like this in -portable:
return (errno == ELOOP
#if defined(__FreeBSD__)
|| errno == EMLINK
#elif defined(__NetBSD__)
|| errno == EFTYPE
#endif
);
--
Christian "naddy" Weisgerber naddy@mips.inka.de
-portable: add a wrapper for open() on FreeBSD