[krbdev.mit.edu #6308] Alignment problem in resolver test
Ezra Peisach via RT
rt-comment at krbdev.mit.edu
Sat Dec 27 08:48:25 EST 2008
Hi,
Why do you believe you need to use a struct in_addr? Every man page for
gethostbyaddr takes a char * - and the alignment is then I suppose
compiler specific... You did not indicate a compiler version - is this
gcc or Sun's compiler?
I do not have access to solaris 2.10 - but what does the manpage on
gethostbyaddr say? What does the prototype in /usr/include/netdb.h indicate?
I suspect that the problem is not in our code - but something in the OS
library. Is this a known issue with Solaris?
Now scanning the krb5 code - I see one other place in which gethostaddr
is used without a struct (gssapi code) - but it would appear that it is
using malloc - which should be suitably aligned for any variable type...
So - I guess we need to know what is broken - the compiler, the library,
or our code... Coding a work around without understanding the problem
is probably not best. Perhaps you can give us more information...
Ezra
More information about the krb5-bugs
mailing list