mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-04 19:56:36 +02:00
Merge pull request #567 from katterjohn/sockaddr-port-fix
(chibi net): sockaddr-port: return the port number in host byte order
This commit is contained in:
commit
b9c25ab3f1
1 changed files with 1 additions and 1 deletions
|
@ -106,5 +106,5 @@ sexp sexp_sockaddr_name (sexp ctx, sexp self, struct sockaddr* addr) {
|
|||
|
||||
int sexp_sockaddr_port (sexp ctx, sexp self, struct sockaddr* addr) {
|
||||
struct sockaddr_in *sa = (struct sockaddr_in *)addr;
|
||||
return sa->sin_port;
|
||||
return ntohs(sa->sin_port);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue