Fixes for building on Linux

This commit is contained in:
2021-12-29 21:10:41 +01:00
parent 30cfdcc841
commit d2cc71f3fc
3 changed files with 15 additions and 3 deletions

View File

@@ -20,9 +20,9 @@
"${workspaceFolder}", "${workspaceFolder}",
"${workspaceFolder}/src/" "${workspaceFolder}/src/"
], ],
"intelliSenseMode": "clang-x64", "intelliSenseMode": "linux-gcc-x64",
"compilerPath": "/usr/bin/clang", "compilerPath": "/usr/bin/gcc",
"cStandard": "c11", "cStandard": "c17",
"cppStandard": "c++17" "cppStandard": "c++17"
}, },
{ {

9
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,9 @@
{
"files.associations": {
"time.h": "c",
"signal.h": "c",
"execinfo.h": "c",
"dlfcn.h": "c",
"siginfo_t.h": "c"
}
}

View File

@@ -5,6 +5,7 @@
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <stdlib.h>
#include "util.h" #include "util.h"
///////////////////////////// /////////////////////////////
@@ -78,6 +79,7 @@ void Time_Pause(int pausa) {
} while (tend >= t); } while (tend >= t);
} }
#else #else
#include <sys/time.h>
///////////////////////////// /////////////////////////////
// Time_GetTime // Time_GetTime
// //
@@ -249,6 +251,7 @@ void Exceptions_Init() {}
#include <dlfcn.h> #include <dlfcn.h>
#include <execinfo.h> #include <execinfo.h>
#include <memory.h> #include <memory.h>
#include <unistd.h>
void Exception_Signal(int senhal, siginfo_t *info, void *ptr) { void Exception_Signal(int senhal, siginfo_t *info, void *ptr) {
int kill_self = 0; int kill_self = 0;