Fix OpenBSD compilation: strndup is a GNU extension.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23351 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-05-20 11:36:50 +00:00
parent 02424fa21f
commit 3d8bc9fbc1
1 changed files with 2 additions and 2 deletions

View File

@ -190,13 +190,13 @@ static tvi_handle_t *tvi_init_bsdbt848(char *device,char* adevice)
priv->tunerdev = strdup("/dev/tuner0");
}else{
sep = strchr(device,',');
priv->btdev = strdup(device);
if(sep){
// tuner device is also passed
priv->tunerdev = strdup(sep+1);
priv->btdev = strndup(device,sep-device);
priv->btdev[sep - device] = 0;
}else{
priv->tunerdev = strdup("/dev/tuner0");
priv->btdev = strdup(device);
}
}