mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 06:39:17 +02:00
(chibi net): sockaddr-port: return the port number in host byte order
This commit is contained in:
parent
197894eb87
commit
a7a620af1a
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