Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Patched new filesystem code to compile.
  • Loading branch information
icculus committed Aug 21, 2013
1 parent 2dd7091 commit c9152ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/filesystem/cocoa/SDL_sysfilesystem.m
Expand Up @@ -27,6 +27,7 @@

#include <Cocoa/Cocoa.h>
#include <sys/stat.h>
#include <sys/types.h>

#include "SDL_error.h"
#include "SDL_stdinc.h"
Expand Down
7 changes: 5 additions & 2 deletions src/filesystem/unix/SDL_sysfilesystem.c
Expand Up @@ -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;
Expand Down Expand Up @@ -71,7 +74,7 @@ SDL_GetBasePath(void)
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... */
Expand Down
2 changes: 1 addition & 1 deletion src/filesystem/windows/SDL_sysfilesystem.c
Expand Up @@ -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"

Expand Down

0 comments on commit c9152ad

Please sign in to comment.