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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux