Re: [PATCH 10/10] http: fix build error on FreeBSD
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Oct 14, 2024, 22:14 UTC
- Message-ID
- <Zw2XrAkyOvYFwEDp@nand.local>
- In-Reply-To
- <deb30e12a5861410b6c3b7385fe09599ddd0394b.1728906490.git.ps@pks.im>
On Mon, Oct 14, 2024 at 02:21:39PM +0200, Patrick Steinhardt wrote:
Show 9 quoted lines
> 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