mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 14:50:17 +00:00
Fix port problem on big-endian machines.
This commit is contained in:
parent
c65652ec7a
commit
c4f0da0d56
@ -1,6 +1,6 @@
|
||||
/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
|
||||
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
@ -349,10 +349,10 @@ __nis_create_callback (int (*callback) (const_nis_name, const nis_object *,
|
||||
syslog (LOG_ERR, "NIS+: failed to read local socket info");
|
||||
return NULL;
|
||||
}
|
||||
port = sin.sin_port;
|
||||
port = ntohs (sin.sin_port);
|
||||
get_myaddress (&sin);
|
||||
snprintf (addr, sizeof (addr), "%s.%d.%d", inet_ntoa (sin.sin_addr),
|
||||
port & 0x00FF, (port & 0xFF00) >> 8);
|
||||
(port & 0xFF00) >> 8, port & 0x00FF);
|
||||
cb->serv->ep.ep_val[0].uaddr = strdup (addr);
|
||||
|
||||
return cb;
|
||||
|
Loading…
Reference in New Issue
Block a user