Fix a few compile errors on really ancient systems

This commit is contained in:
UnknownShadow200 2019-07-05 20:34:46 +10:00
parent 990b722e39
commit 47ea32922f
2 changed files with 9 additions and 7 deletions

View File

@ -544,7 +544,7 @@ static ReturnCode Http_DownloadData(struct HttpRequest* req, HINTERNET handle) {
uint8_t* buffer;
uint32_t size, totalRead;
DWORD read, avail;
bool success;
BOOL success;
http_curProgress = 0;
size = req->ContentLength ? req->ContentLength : 1;
@ -726,7 +726,8 @@ static ReturnCode Http_SysDo(struct HttpRequest* req) {
res = curl_easy_perform(curl);
http_curProgress = 100;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
/* non-obsolete is CURLINFO_RESPONSE_CODE */
curl_easy_getinfo(curl, CURLINFO_HTTP_CODE, &status);
req->StatusCode = status;
curl_slist_free_all(headers_list);

View File

@ -20,6 +20,8 @@
/* POSIX can be shared between unix-ish systems */
#ifdef CC_BUILD_POSIX
#include <execinfo.h>
#include <signal.h>
#if defined CC_BUILD_OPENBSD
/* OpenBSD doesn't provide ucontext.h */
#elif defined CC_BUILD_LINUX
@ -30,11 +32,6 @@
#else
#include <ucontext.h>
#endif
#include <execinfo.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#endif
@ -552,6 +549,10 @@ static void Logger_DumpRegisters(void* ctx) {
/* OS specific stuff */
#if defined CC_BUILD_LINUX || defined CC_BUILD_SOLARIS
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
static void Logger_DumpMisc(void* ctx) {
static const String memMap = String_FromConst("-- memory map --\n");
String str; char strBuffer[320];