diff options
| author | Taylor Blau <me@ttaylorr.com> | 2024-11-01 12:53:16 -0400 |
|---|---|---|
| committer | Taylor Blau <me@ttaylorr.com> | 2024-11-01 12:53:17 -0400 |
| commit | 268fd2fe58e894a7a0c9736dc32e0c3a3c409cf8 (patch) | |
| tree | 846b6737c4bf05eae4ff39e183c0ae88bb94cb1d /http.c | |
| parent | 47c3170a3e7acce768a6b3d5734da57a2cc6b54c (diff) | |
| parent | dd6003f200745ea3f42dc69c2b2901071ae7a726 (diff) | |
| download | git-268fd2fe58e894a7a0c9736dc32e0c3a3c409cf8.tar.xz | |
Merge branch 'ps/platform-compat-fixes'
Various platform compatibility fixes split out of the larger effort
to use Meson as the primary build tool.
* ps/platform-compat-fixes:
t6006: fix prereq handling with `test_format ()`
http: fix build error on FreeBSD
builtin/credential-cache: fix missing parameter for stub function
t7300: work around platform-specific behaviour with long paths on MinGW
t5500, t5601: skip tests which exercise paths with '[::1]' on Cygwin
t3404: work around platform-specific behaviour on macOS 10.15
t1401: make invocation of tar(1) work with Win32-provided one
t/lib-gpg: fix setup of GNUPGHOME in MinGW
t/lib-gitweb: test against the build version of gitweb
t/test-lib: wire up NO_ICONV prerequisite
t/test-lib: fix quoting of TEST_RESULTS_SAN_FILE
Diffstat (limited to 'http.c')
| -rw-r--r-- | http.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -2290,17 +2290,19 @@ static int http_request_reauth(const char *url, case HTTP_REQUEST_STRBUF: strbuf_reset(result); break; - case HTTP_REQUEST_FILE: - if (fflush(result)) { + case HTTP_REQUEST_FILE: { + FILE *f = result; + if (fflush(f)) { error_errno("unable to flush a file"); return HTTP_START_FAILED; } - rewind(result); - if (ftruncate(fileno(result), 0) < 0) { + rewind(f); + if (ftruncate(fileno(f), 0) < 0) { error_errno("unable to truncate a file"); return HTTP_START_FAILED; } break; + } default: BUG("Unknown http_request target"); } |
