Mercurial > sdl-ios-xcode
changeset 4344:14f95e514408 SDL-1.2
patch-pulse (from ahoka@NetBSD.org):
Fix assertion triggered in pulsaudio by returning "unknown" instead
of NULL pointer when guessing application name.
- Use getprogname on NetBSD as it wont return NULL
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 16 Oct 2009 05:12:20 +0000 |
parents | d380e7a6265b |
children | b40d6e58a5e5 |
files | src/audio/pulse/SDL_pulseaudio.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audio/pulse/SDL_pulseaudio.c Fri Oct 16 05:06:17 2009 +0000 +++ b/src/audio/pulse/SDL_pulseaudio.c Fri Oct 16 05:12:20 2009 +0000 @@ -346,8 +346,8 @@ /* Try to get the name of the program */ static char *get_progname(void) { +#ifdef __LINUX__ char *progname = NULL; -#ifdef __LINUX__ FILE *fp; static char temp[BUFSIZ]; @@ -364,8 +364,12 @@ } fclose(fp); } + return(progname); +#elif defined(__NetBSD__) + return getprogname(); +#else + return("unknown"); #endif - return(progname); } static void stream_drain_complete(pa_stream *s, int success, void *userdata) {