patch-pulse (from ahoka@NetBSD.org): SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Fri, 16 Oct 2009 05:12:20 +0000
branchSDL-1.2
changeset 434414f95e514408
parent 4343 d380e7a6265b
child 4345 b40d6e58a5e5
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
src/audio/pulse/SDL_pulseaudio.c
     1.1 --- a/src/audio/pulse/SDL_pulseaudio.c	Fri Oct 16 05:06:17 2009 +0000
     1.2 +++ b/src/audio/pulse/SDL_pulseaudio.c	Fri Oct 16 05:12:20 2009 +0000
     1.3 @@ -346,8 +346,8 @@
     1.4  /* Try to get the name of the program */
     1.5  static char *get_progname(void)
     1.6  {
     1.7 +#ifdef __LINUX__
     1.8  	char *progname = NULL;
     1.9 -#ifdef __LINUX__
    1.10  	FILE *fp;
    1.11  	static char temp[BUFSIZ];
    1.12  
    1.13 @@ -364,8 +364,12 @@
    1.14  		}
    1.15  		fclose(fp);
    1.16  	}
    1.17 +	return(progname);
    1.18 +#elif defined(__NetBSD__)
    1.19 +	return getprogname();
    1.20 +#else
    1.21 +	return("unknown");
    1.22  #endif
    1.23 -	return(progname);
    1.24  }
    1.25  
    1.26  static void stream_drain_complete(pa_stream *s, int success, void *userdata) {