https://bugzilla.novell.com/show_bug.cgi?id=640088
https://bugzilla.novell.com/show_bug.cgi?id=640088#c4
--- Comment #4 from Justo Alonso 2010-09-17 14:27:53 UTC ---
web15:~ # cat bug-640088_gethostbyname_flavor.c
#include
#include
#include
#include
#include
int main(int argc, char *argv[])
{
int err = 0;
struct hostent hebuf, *hp;
char buf[10];
/* Try resolving a invalid name using glibc flavor. */
(void)gethostbyname_r("@#!", &hebuf, buf, sizeof(buf), &hp, &err);
if (err != 0)
{
puts("glibc flavour\n");
return 0;
}
else
{
puts("Sun flavour\n");
return 1;
}
}
web15:~ # gcc -o bug-640088_gethostbyname_flavor -g -O2
bug-640088_gethostbyname_flavor.c -ldl -lnsl
web15:~ # ./bug-640088_gethostbyname_flavor
Sun flavour
web15:~ #
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.