src/filesystem/unix/SDL_sysfilesystem.c
changeset 7717 0f48be750bba
parent 7715 24f652e130fa
child 7718 213b9777e988
equal deleted inserted replaced
7716:be4cda94bce2 7717:0f48be750bba
    82     char *retval = NULL;
    82     char *retval = NULL;
    83 
    83 
    84 #if defined(__FREEBSD__)
    84 #if defined(__FREEBSD__)
    85     char fullpath[PATH_MAX];
    85     char fullpath[PATH_MAX];
    86     size_t buflen = sizeof (fullpath);
    86     size_t buflen = sizeof (fullpath);
    87     const int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
    87     const int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
    88     if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) {
    88     if (sysctl(mib, SDL_arraysize(mib), fullpath, &buflen, NULL, 0) != -1) {
    89         retval = SDL_strdup(fullpath);
    89         retval = SDL_strdup(fullpath);
    90         if (!retval) {
    90         if (!retval) {
    91             SDL_OutOfMemory();
    91             SDL_OutOfMemory();
    92             return NULL;
    92             return NULL;
    93         }
    93         }