changeset 14301:efa291d270b7

Do not use strndup, it is missing on MinGW.
author reimar
date Sun, 02 Jan 2005 16:39:03 +0000
parents 8f1ab3da482c
children 9929eafe6be5
files libao2/ao_pcm.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_pcm.c	Sun Jan 02 16:01:36 2005 +0000
+++ b/libao2/ao_pcm.c	Sun Jan 02 16:39:03 2005 +0000
@@ -93,7 +93,9 @@
 	if (subopt_parse(ao_subdevice, subopts) != 0) {
 	  return 0;
 	}
-	ao_outputfilename = strndup(file.str, file.len);
+	ao_outputfilename = malloc(file.len + 1);
+	memcpy(ao_outputfilename, file.str, file.len);
+	ao_outputfilename[file.len] = 0;
 
 	/* bits is only equal to format if (format == 8) or (format == 16);
 	   this means that the following "if" is a kludge and should