From bbd2ca8ddfbb3075bb0885f0eecf48d647e48847 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 16 Jun 2017 01:25:39 +0300 Subject: [PATCH] Fixed Linux compilation --- SDL/utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SDL/utils.c b/SDL/utils.c index 56ba7ac..d14beed 100644 --- a/SDL/utils.c +++ b/SDL/utils.c @@ -7,6 +7,10 @@ #include #include #endif +#ifdef __linux__ +#include +#include +#endif #include "utils.h" const char *executable_folder(void) @@ -21,7 +25,7 @@ const char *executable_folder(void) _NSGetExecutablePath(&path[0], &length); #else #ifdef __linux__ - ssize_t length = readlink("/proc/self/exe", &path[0], sizeof(path) - 1); + ssize_t __attribute__((unused)) length = readlink("/proc/self/exe", &path[0], sizeof(path) - 1); assert (length != -1); #else #ifdef _WIN32