diff --git a/src/audio/pulse/SDL_pulseaudio.c b/src/audio/pulse/SDL_pulseaudio.c index 3e918b18c..21e51cd53 100644 --- a/src/audio/pulse/SDL_pulseaudio.c +++ b/src/audio/pulse/SDL_pulseaudio.c @@ -346,8 +346,8 @@ static void PULSE_CloseAudio(_THIS) /* Try to get the name of the program */ static char *get_progname(void) { - char *progname = NULL; #ifdef __LINUX__ + char *progname = NULL; FILE *fp; static char temp[BUFSIZ]; @@ -364,8 +364,12 @@ static char *get_progname(void) } fclose(fp); } -#endif return(progname); +#elif defined(__NetBSD__) + return getprogname(); +#else + return("unknown"); +#endif } static void stream_drain_complete(pa_stream *s, int success, void *userdata) {