mirror of https://github.com/mpv-player/mpv
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:
parent
02424fa21f
commit
3d8bc9fbc1
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue