civetweb: fix warnings
This commit is contained in:
6
third_party/civetweb/src/civetweb.c
vendored
6
third_party/civetweb/src/civetweb.c
vendored
@@ -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)) {
|
||||
|
||||
5
third_party/civetweb/tnt/README
vendored
5
third_party/civetweb/tnt/README
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user