[Date Prev][Date Next] [Chronological] [Thread] [Top]

s_addr may be a bit field (ITS#340)

Full_Name: Keith Thompson
Version: 1.2.7
URL: ftp://ftp.sdsc.edu/pub/outgoing/kst/OpenLDAP-patches-1.2.7/
Submission from: (NULL) (

The s_addr member of the type "struct in_addr", declared in <netinet/in.h>,
may be a bit field on some systems.  Specifically, it's declared as a 32-bit
bit field on the Cray T3E and Cray T90, under UNICOS.  (The T90 has no 32-bit
integer types; the T3E uses the same headers for consistency.)  Since applying
an address or sizeof operator to a bit field is illegal, this causes

The provided patch changes references to the address of an s_addr member to
the address of the enclosing structure, which gives the same result on all
systems I've been able to check.

For the size of an s_addr field, it conditionally uses the macro
which is provided in the UNICOS version of <netinet/in.h>.

For more information, see the README file under the provided URL, which
patches for three problems including this one.