Merge pull request #17 from WickedSmoke/master

Fix Linux build
This commit is contained in:
Eric Lasota
2023-05-24 22:43:03 -04:00
committed by GitHub
3 changed files with 4 additions and 7 deletions

View File

@@ -27,7 +27,7 @@
#include "UTF8.h"
#if defined(__CYGWIN__) || defined(__MACOS__)
#if defined(__CYGWIN__) || defined(__MACOS__) || defined(__linux)
typedef off_t off64_t;
#define fstat64 fstat
#define fseek64 fseek
@@ -305,6 +305,8 @@ GpIOStream *GpFileSystem_X::OpenFileNested(PortabilityLayer::VirtualDirectory_t
FILE *f = fopen(resolvedPath.c_str(), mode);
if (!f)
{
fprintf(stderr, "GpFileSystem_X: Cannot open \"%s\"\n",
resolvedPath.c_str());
free(objStorage);
return nullptr;
}

View File

@@ -30,7 +30,7 @@ IGpDisplayDriver *GpDriver_CreateDisplayDriver_SDL_GL2(const GpDisplayDriverProp
IGpAudioDriver *GpDriver_CreateAudioDriver_SDL(const GpAudioDriverProperties &properties);
IGpInputDriver *GpDriver_CreateInputDriver_SDL2_Gamepad(const GpInputDriverProperties &properties);
#ifdef __MACOS__
#ifndef _WIN32
int main(int argc, char *argv[])
#else
SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[])

View File

@@ -3,13 +3,8 @@
#include "IGpClipboardContents.h"
#include "IGpThreadEvent.h"
#ifdef __MACOS__
#include <SDL.h>
#include <pthread.h>
#else
#include "SDL2/SDL.h"
#endif
#include <time.h>
#include <unistd.h>
#include <string>