mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 18:50:31 -04: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
1 changed files with 7 additions and 2 deletions
|
|
@ -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