src/filesystem/unix/SDL_sysfilesystem.c
changeset 7718 213b9777e988
parent 7717 0f48be750bba
child 7719 31b5f9ff36ca
equal deleted inserted replaced
7717:0f48be750bba 7718:213b9777e988
   103     }
   103     }
   104 #endif
   104 #endif
   105 
   105 
   106     /* is a Linux-style /proc filesystem available? */
   106     /* is a Linux-style /proc filesystem available? */
   107     if (!retval && (access("/proc", F_OK) == 0)) {
   107     if (!retval && (access("/proc", F_OK) == 0)) {
   108         #if defined(__FREEBSD__)
   108 #if defined(__FREEBSD__)
   109         retval = readSymLink("/proc/curproc/file");
   109         retval = readSymLink("/proc/curproc/file");
   110         #elif defined(__NETBSD__)
   110 #elif defined(__NETBSD__)
   111         retval = readSymLink("/proc/curproc/exe");
   111         retval = readSymLink("/proc/curproc/exe");
   112         #else
   112 #else
   113         retval = readSymLink("/proc/self/exe");  /* linux. */
   113         retval = readSymLink("/proc/self/exe");  /* linux. */
   114         #endif
   114 #endif
   115         if (retval == NULL) {
   115         if (retval == NULL) {
   116             /* older kernels don't have /proc/self ... try PID version... */
   116             /* older kernels don't have /proc/self ... try PID version... */
   117             char path[64];
   117             char path[64];
   118             const int rc = (int) SDL_snprintf(path, sizeof(path),
   118             const int rc = (int) SDL_snprintf(path, sizeof(path),
   119                                               "/proc/%llu/exe",
   119                                               "/proc/%llu/exe",