src/filesystem/unix/SDL_sysfilesystem.c
changeset 7697 678f71df2c6b
parent 7695 47d12c248988
child 7713 6074c53b0cda
equal deleted inserted replaced
7696:e605ca133ac6 7697:678f71df2c6b
    80     char *retval = NULL;
    80     char *retval = NULL;
    81 
    81 
    82 #if defined(__FREEBSD__)
    82 #if defined(__FREEBSD__)
    83     char fullpath[PATH_MAX];
    83     char fullpath[PATH_MAX];
    84     size_t buflen = sizeof (fullpath);
    84     size_t buflen = sizeof (fullpath);
    85     int mib[4];
    85     const int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
    86     mib[0] = CTL_KERN;
       
    87     mib[1] = KERN_PROC;
       
    88     mib[2] = KERN_PROC_PATHNAME;
       
    89     mib[3] = -1;
       
    90     if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) {
    86     if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) {
    91         retval = SDL_strdup(fullpath);
    87         retval = SDL_strdup(fullpath);
    92         if (!retval) {
    88         if (!retval) {
    93             SDL_OutOfMemory();
    89             SDL_OutOfMemory();
    94             return NULL;
    90             return NULL;