Patched new filesystem code to compile.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 20 Aug 2013 20:15:15 -0400
changeset 7668 66da4242ce53
parent 7667 be1cc6f55840
child 7669 d0dcdb5b143c
Patched new filesystem code to compile.
src/filesystem/cocoa/SDL_sysfilesystem.m
src/filesystem/unix/SDL_sysfilesystem.c
src/filesystem/windows/SDL_sysfilesystem.c
--- a/src/filesystem/cocoa/SDL_sysfilesystem.m	Tue Aug 20 19:57:11 2013 -0400
+++ b/src/filesystem/cocoa/SDL_sysfilesystem.m	Tue Aug 20 20:15:15 2013 -0400
@@ -27,6 +27,7 @@
 
 #include <Cocoa/Cocoa.h>
 #include <sys/stat.h>
+#include <sys/types.h>
 
 #include "SDL_error.h"
 #include "SDL_stdinc.h"
--- a/src/filesystem/unix/SDL_sysfilesystem.c	Tue Aug 20 19:57:11 2013 -0400
+++ b/src/filesystem/unix/SDL_sysfilesystem.c	Tue Aug 20 20:15:15 2013 -0400
@@ -26,12 +26,15 @@
 /* System dependent filesystem routines                                */
 
 #include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #include "SDL_error.h"
 #include "SDL_stdinc.h"
 #include "SDL_filesystem.h"
 
-static char *readSymLink(const char *path)
+static char *
+readSymLink(const char *path)
 {
     char *retval = NULL;
     ssize_t len = 64;
@@ -71,7 +74,7 @@
     char *retval = NULL;
 
     /* is a Linux-style /proc filesystem available? */
-    if (access("/proc", F_OK) {
+    if (access("/proc", F_OK) == 0) {
         retval = readSymLink("/proc/self/exe");
         if (retval == NULL) {
             /* older kernels don't have /proc/self ... try PID version... */
--- a/src/filesystem/windows/SDL_sysfilesystem.c	Tue Aug 20 19:57:11 2013 -0400
+++ b/src/filesystem/windows/SDL_sysfilesystem.c	Tue Aug 20 20:15:15 2013 -0400
@@ -26,7 +26,7 @@
 /* System dependent filesystem routines                                */
 
 #include "SDL_error.h"
-#include "SDL_windows.h"
+#include "../../core/windows/SDL_windows.h"
 #include "SDL_stdinc.h"
 #include "SDL_filesystem.h"