mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
pty: changed pstname_r to ptsname for OSX compatibility
This commit is contained in:
parent
ba6f6fc127
commit
e496024c9c
@ -118,10 +118,14 @@ file_error sdl_close_ptty(osd_file *file)
|
||||
|
||||
file_error sdl_slave_name_ptty(osd_file *file , char *name , size_t name_len)
|
||||
{
|
||||
if (ptsname_r(file->handle , name , name_len) < 0) {
|
||||
const char *slave_name = ptsname(file->handle);
|
||||
|
||||
if (slave_name == NULL || strlen(slave_name) >= name_len) {
|
||||
return FILERR_INVALID_ACCESS;
|
||||
}
|
||||
|
||||
strcpy(name , slave_name);
|
||||
|
||||
return FILERR_NONE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user