mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
Maybe it will run on SunOS 5.8 now.
This commit is contained in:
parent
dd4afdf4eb
commit
dc305d0368
2 changed files with 20 additions and 1 deletions
13
bin/9l
13
bin/9l
|
@ -205,6 +205,19 @@ case "$tag" in
|
|||
;;
|
||||
esac
|
||||
done
|
||||
case "${SYSVERSION:-`uname -r`}" in
|
||||
5.[67])
|
||||
echo do not know how to link right thread library on "$tag" 1>&2
|
||||
;;
|
||||
5.8)
|
||||
# Some trickery is needed to force use of
|
||||
# alternate thread lib from /usr/lib/lwp
|
||||
# Likely, this only works with sun cc,
|
||||
# for other compiler/loader we would need other flags.
|
||||
ld="$ld -i"
|
||||
extralibs="$extralibs /usr/lib/lwp/libthread.so -R/usr/lib/lwp:/usr/lib"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo do not know how to link on "$tag" 1>&2
|
||||
|
|
|
@ -9,8 +9,14 @@
|
|||
int
|
||||
getpts(int fd[], char *slave)
|
||||
{
|
||||
void (*f)(int);
|
||||
int r;
|
||||
|
||||
fd[1] = open("/dev/ptmx", ORDWR);
|
||||
if ((grantpt(fd[1]) < 0) || (unlockpt(fd[1]) < 0))
|
||||
f = signal(SIGCLD, SIG_DFL);
|
||||
r = grantpt(fd[1]);
|
||||
signal(SIGCLD, f);
|
||||
if(r < 0 || unlockpt(fd[1]) < 0)
|
||||
return -1;
|
||||
fchmod(fd[1], 0622);
|
||||
|
||||
|
|
Loading…
Reference in a new issue