Current-Users archive

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

Re: mDNSResponder build failure on 64-bit platform (amd64)

On Fri, Oct 02, 2009 at 09:55:50AM -0400, Christos Zoulas wrote:
> The code is written so that if the structure is not the right size,
> the array size ends negative.

Yes, but why would the size of the structure differ if unpacked?

typedef packedstruct
    uint32_t version;
    uint32_t datalen;
    uint32_t ipc_flags;
    uint32_t op;                // request_op_t or reply_op_t
    client_context_t client_context; // context passed from client, returned by$
    uint32_t reg_index;            // identifier for a record registered via DN$
    // socket connected by DNSServiceConnect().  Must be unique in the scope of$
    // index/socket pair uniquely identifies a record.  (Used to select records$
    } ipc_msg_hdr;

typedef packedunion
    void *context;
    uint32_t u32[2];
    } client_context_t;

I.e. the structure should be naturally aligned. What am I missing?


Home | Main Index | Thread Index | Old Index