ape/bsd/bind.c: Do not issue "bind *".
Despite the documentation, "bind *" is invalid and gives the error "bad numeric port" in devip.c:setladdrport. "bind 0" OTOH is actually supported fine in the Plan9 API and has the right sematics.
This commit is contained in:
parent
0ec0154bc9
commit
9fc38d43d4
1 changed files with 1 additions and 4 deletions
|
@ -56,10 +56,7 @@ bind(int fd, void *a, int alen)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
port = _sock_inport(&r->addr);
|
port = _sock_inport(&r->addr);
|
||||||
if(port > 0)
|
snprintf(msg, sizeof msg, "bind %d", port);
|
||||||
snprintf(msg, sizeof msg, "bind %d", port);
|
|
||||||
else
|
|
||||||
strcpy(msg, "bind *");
|
|
||||||
n = write(cfd, msg, strlen(msg));
|
n = write(cfd, msg, strlen(msg));
|
||||||
if(n < 0){
|
if(n < 0){
|
||||||
errno = EOPNOTSUPP; /* Improve error reporting!!! */
|
errno = EOPNOTSUPP; /* Improve error reporting!!! */
|
||||||
|
|
Loading…
Reference in a new issue