[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lynx-dev] Lynx 2.8.5 compile bug on Mac OS X: "h_addr" (fix included)

From: kmg
Subject: [Lynx-dev] Lynx 2.8.5 compile bug on Mac OS X: "h_addr" (fix included)
Date: Mon, 2 Oct 2006 23:05:41 -0500

Hi there,

In Lynx 2.8.5, there is one bug in the source that prevents a build
on Mac OS X "out of the box".

The fix is as follows:

In WWW/Library/Implementation/HTTCP.c:1329
change "h_addr" on this line:
memcpy((void *)&soc_in->sin_addr, phost->h_addr, phost- >h_length);

memcpy((void *)&soc_in->sin_addr, phost->h_addr_list[0], phost- >h_length);

The "h_addr" field is not defined in "struct hostent" on Mac OS X (10.4,
at least).

Another possible fix, which I haven't tried, is to fix the part of "configure" that determines when "_POSIX_C_SOURCE" should be defined. It would appear
Mac OS X has a conditional in its <netdb.h> that #defines "h_addr" for
backward compatibility for "#ifndef _POSIX_C_SOURCE". By default, "configure"
#defines _POSIX_C_SOURCE on my Mac.

Once I applied the fix above, I was able to compile Lynx just fine. :)

Kevin G.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]