mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 08:00:30 +00:00
If the sysctl kern.pts.enable doesn't exist, check that /dev/ptmx is there,
and if so, use the pts system. Suggested by: rwatson
This commit is contained in:
parent
5276d7471f
commit
9b1fa2482e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154965
|
@ -100,8 +100,13 @@ __use_pts(void)
|
|||
|
||||
len = sizeof(use_pts);
|
||||
error = sysctlbyname("kern.pts.enable", &use_pts, &len, NULL, 0);
|
||||
if (error)
|
||||
return (0);
|
||||
if (error) {
|
||||
struct stat sb;
|
||||
|
||||
if (stat("/dev/ptmx", &sb) != 0)
|
||||
return (0);
|
||||
use_pts = 1;
|
||||
}
|
||||
return (use_pts);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue