Patched new filesystem code to compile.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 20 Aug 2013 20:15:15 -0400
changeset 766866da4242ce53
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
     1.1 --- a/src/filesystem/cocoa/SDL_sysfilesystem.m	Tue Aug 20 19:57:11 2013 -0400
     1.2 +++ b/src/filesystem/cocoa/SDL_sysfilesystem.m	Tue Aug 20 20:15:15 2013 -0400
     1.3 @@ -27,6 +27,7 @@
     1.4  
     1.5  #include <Cocoa/Cocoa.h>
     1.6  #include <sys/stat.h>
     1.7 +#include <sys/types.h>
     1.8  
     1.9  #include "SDL_error.h"
    1.10  #include "SDL_stdinc.h"
     2.1 --- a/src/filesystem/unix/SDL_sysfilesystem.c	Tue Aug 20 19:57:11 2013 -0400
     2.2 +++ b/src/filesystem/unix/SDL_sysfilesystem.c	Tue Aug 20 20:15:15 2013 -0400
     2.3 @@ -26,12 +26,15 @@
     2.4  /* System dependent filesystem routines                                */
     2.5  
     2.6  #include <unistd.h>
     2.7 +#include <sys/stat.h>
     2.8 +#include <sys/types.h>
     2.9  
    2.10  #include "SDL_error.h"
    2.11  #include "SDL_stdinc.h"
    2.12  #include "SDL_filesystem.h"
    2.13  
    2.14 -static char *readSymLink(const char *path)
    2.15 +static char *
    2.16 +readSymLink(const char *path)
    2.17  {
    2.18      char *retval = NULL;
    2.19      ssize_t len = 64;
    2.20 @@ -71,7 +74,7 @@
    2.21      char *retval = NULL;
    2.22  
    2.23      /* is a Linux-style /proc filesystem available? */
    2.24 -    if (access("/proc", F_OK) {
    2.25 +    if (access("/proc", F_OK) == 0) {
    2.26          retval = readSymLink("/proc/self/exe");
    2.27          if (retval == NULL) {
    2.28              /* older kernels don't have /proc/self ... try PID version... */
     3.1 --- a/src/filesystem/windows/SDL_sysfilesystem.c	Tue Aug 20 19:57:11 2013 -0400
     3.2 +++ b/src/filesystem/windows/SDL_sysfilesystem.c	Tue Aug 20 20:15:15 2013 -0400
     3.3 @@ -26,7 +26,7 @@
     3.4  /* System dependent filesystem routines                                */
     3.5  
     3.6  #include "SDL_error.h"
     3.7 -#include "SDL_windows.h"
     3.8 +#include "../../core/windows/SDL_windows.h"
     3.9  #include "SDL_stdinc.h"
    3.10  #include "SDL_filesystem.h"
    3.11