Windows build fixes.

This commit is contained in:
Steve 2016-02-25 11:46:39 +00:00
parent 19630696c5
commit 84889d8391
3 changed files with 10 additions and 1 deletions

View File

@ -2,6 +2,7 @@
#include "stdio.h"
#include "string.h"
#include "math.h"
#include "ctype.h"
#include "SDL2/SDL.h"

View File

@ -36,7 +36,7 @@ void createSaveFolder(void)
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "User home = %s", userHome);
sprintf(dir, "%s/tbftss", userHome);
if (mkdir(dir, S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH) != 0 && errno != EEXIST)
if (mkdir(dir) != 0 && errno != EEXIST)
{
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "Failed to create save dir '%s'. Will save to current dir.", dir);
return;

View File

@ -17,3 +17,11 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include "../../common.h"
extern App app;