Subject: Re: [PATCH 10/10] http: fix build error on FreeBSD

From: Taylor Blau <[email-masked]>
Date: Mon, 14 Oct 2024 18:14:04 -0400

On Mon, Oct 14, 2024 at 02:21:39PM +0200, Patrick Steinhardt wrote:
> The `result` parameter passed to `http_request_reauth()` may either
> point to a `struct strbuf` or a `FILE *`, where the `target` parameter
> tells us which of either it actually is. To accommodate for both types
> the pointer is a `void *`, which we then pass directly to functions
> without doing a cast.
>
> This is fine on most platforms, but it breaks on FreeBSD because
> `fileno()` is implemented as a macro that tries to directly access the
> `FILE *` structure.

Hah. I'm sure this was another fun debugging story ;-). Reading this
made me chuckle aloud, but the fix you wrote here makes perfect sense to
me.

Thanks,
Taylor