Fix macOS compilation for real
This commit is contained in:
@@ -7,6 +7,12 @@
|
||||
#include <stdbool.h>
|
||||
#ifdef G_OS_UNIX
|
||||
#include <sys/un.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef BSD
|
||||
#define g_strlcpy strlcpy
|
||||
#else
|
||||
extern int g_strlcpy(gchar* dest, const gchar* src, gsize dest_size);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern inline void insque(void *a, void *b)
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <dlfcn.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/mouse.h>
|
||||
@@ -183,7 +183,7 @@ plat_tempfile(char *bufp, char *prefix, char *suffix)
|
||||
gettimeofday(&t, NULL);
|
||||
curtime = time(NULL);
|
||||
calendertime = localtime(&curtime);
|
||||
sprintf(&bufp[strlen(bufp)], "%d%02d%02d-%02d%02d%02d-%03d%s", calendertime->tm_year, calendertime->tm_mon, calendertime->tm_mday, calendertime->tm_hour, calendertime->tm_min, calendertime->tm_sec, t.tv_usec / 1000, suffix);
|
||||
sprintf(&bufp[strlen(bufp)], "%d%02d%02d-%02d%02d%02d-%03ld%s", calendertime->tm_year, calendertime->tm_mon, calendertime->tm_mday, calendertime->tm_hour, calendertime->tm_min, calendertime->tm_sec, t.tv_usec / 1000, suffix);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -514,14 +514,14 @@ do_stop(void)
|
||||
|
||||
int ui_msgbox(int flags, void *message)
|
||||
{
|
||||
fprintf(stderr, "Got msgbox request. Flags: 0x%X, msgid: %llu\n", flags, (uint64_t) message);
|
||||
fprintf(stderr, "Got msgbox request. Flags: 0x%X, msgid: %llu\n", flags, (unsigned long long) message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ui_msgbox_header(int flags, void *message, void* header)
|
||||
{
|
||||
// Parameters that are passed will crash the program so keep these off for the time being.
|
||||
fprintf(stderr, "Got msgbox request. Flags: 0x%X, msgid: %llu, hdrid: %llu\n", flags, (uint64_t) message, (uint64_t) header);
|
||||
fprintf(stderr, "Got msgbox request. Flags: 0x%X, msgid: %llu, hdrid: %llu\n", flags, (unsigned long long) message, (unsigned long long) header);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -742,4 +742,4 @@ void startblit()
|
||||
void endblit()
|
||||
{
|
||||
SDL_UnlockMutex(blitmtx);
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_messagebox.h>
|
||||
#include <SDL.h>
|
||||
#include <SDL_messagebox.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
Reference in New Issue
Block a user