Commit 80ebd91
http: fix build error on FreeBSD
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.
Fix this issue by storing the `FILE *` in a local variable before we
pass it on to other functions.
Signed-off-by: Patrick Steinhardt <[email protected]>
Signed-off-by: Taylor Blau <[email protected]>1 parent 87ad2a9 commit 80ebd91
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2290 | 2290 | | |
2291 | 2291 | | |
2292 | 2292 | | |
2293 | | - | |
2294 | | - | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
2295 | 2296 | | |
2296 | 2297 | | |
2297 | 2298 | | |
2298 | | - | |
2299 | | - | |
| 2299 | + | |
| 2300 | + | |
2300 | 2301 | | |
2301 | 2302 | | |
2302 | 2303 | | |
2303 | 2304 | | |
| 2305 | + | |
2304 | 2306 | | |
2305 | 2307 | | |
2306 | 2308 | | |
| |||
0 commit comments