From bf9d1f1967d3be3beabd287481e9ee2eb9daa78f Mon Sep 17 00:00:00 2001 From: Philip Rideout Date: Mon, 16 Sep 2019 09:24:42 -0700 Subject: [PATCH] civetweb: fix warnings --- third_party/civetweb/src/civetweb.c | 6 +++--- third_party/civetweb/tnt/README | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/third_party/civetweb/src/civetweb.c b/third_party/civetweb/src/civetweb.c index bb3ef29d7e..1184e25273 100644 --- a/third_party/civetweb/src/civetweb.c +++ b/third_party/civetweb/src/civetweb.c @@ -9577,9 +9577,9 @@ send_file_data(struct mg_connection *conn, offset = (int64_t)sf_offs; } #endif - if ((offset > 0) && (fseeko(filep->access.fp, offset, SEEK_SET) != 0)) { + if ((offset > 0) && (fseek(filep->access.fp, offset, SEEK_SET) != 0)) { mg_cry_internal(conn, - "%s: fseeko() failed: %s", + "%s: fseek() failed: %s", __func__, strerror(ERRNO)); mg_send_http_error( @@ -11563,7 +11563,7 @@ put_file(struct mg_connection *conn, const char *path) r1 = r2 = 0; if ((range != NULL) && parse_range_header(range, &r1, &r2) > 0) { conn->status_code = 206; /* Partial content */ - fseeko(file.access.fp, r1, SEEK_SET); + fseek(file.access.fp, r1, SEEK_SET); } if (!forward_body_data(conn, file.access.fp, INVALID_SOCKET, NULL)) { diff --git a/third_party/civetweb/tnt/README b/third_party/civetweb/tnt/README index 185dee0320..0938da2ada 100644 --- a/third_party/civetweb/tnt/README +++ b/third_party/civetweb/tnt/README @@ -2,5 +2,6 @@ This is how third_party/civetweb was created: 1. Downloaded from https://github.com/civetweb/civetweb/tree/3fadd57 2. `rm -rf Qt VisualStudio ci conan zephyr ci distribution contrib test .git src/third_party` -3. Removed "throw" statements from CivetServer::CivetServer. -4. Replaced all other "throw" statements with abort(). +3. In the cpp file, removed "throw" statements from CivetServer::CivetServer. +4. In the cpp file, replaced all other "throw" statements with abort(). +5. In the C file, replaced fseeko with fseek.