[xiph-commits] r16997 - trunk/ao/src
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Mon Mar 22 20:59:12 PDT 2010
Author: xiphmont
Date: 2010-03-22 20:59:12 -0700 (Mon, 22 Mar 2010)
New Revision: 16997
Modified:
trunk/ao/src/audio_out.c
Log:
MacOSX doesn't have strndup()
Modified: trunk/ao/src/audio_out.c
===================================================================
--- trunk/ao/src/audio_out.c 2010-03-23 03:44:55 UTC (rev 16996)
+++ trunk/ao/src/audio_out.c 2010-03-23 03:59:12 UTC (rev 16997)
@@ -714,7 +714,9 @@
t=h;
while(t>p && isspace(*(t-1)))t--;
- ret[count++] = strndup(p,t-p);
+ ret[count] = calloc(t-p+1,1);
+ memcpy(ret[count],p,t-p);
+ count++;
if(!*h)break;
p=h+1;
}
More information about the commits
mailing list