Fix bug 6124: Attempt to fix the build on IRIX
authorVolker Lendecke <vl@samba.org>
Thu, 2 Oct 2008 01:37:52 +0000 (03:37 +0200)
committerVolker Lendecke <vl@samba.org>
Wed, 25 Feb 2009 16:58:36 +0000 (17:58 +0100)
Under irix, "sa_family" is a #define to sa_union.sa_generic.sa_family2

source/librpc/gen_ndr/nbt.h
source/librpc/gen_ndr/ndr_nbt.c
source/librpc/idl/nbt.idl
source/libsmb/dsgetdcname.c

index 264b00b..4b872d7 100644 (file)
@@ -391,7 +391,7 @@ struct nbt_dgram_packet {
 }/* [public,flag(LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX)] */;
 
 struct nbt_sockaddr {
-       uint32_t sa_family;
+       uint32_t sockaddr_family;
        const char * pdc_ip;/* [flag(LIBNDR_FLAG_BIGENDIAN)] */
        DATA_BLOB remaining;/* [flag(LIBNDR_FLAG_REMAINING)] */
 }/* [gensize,public] */;
index 84cfabd..c02b539 100644 (file)
@@ -1531,7 +1531,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_nbt_sockaddr(struct ndr_push *ndr, int ndr_f
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sa_family));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sockaddr_family));
                {
                        uint32_t _flags_save_ipv4address = ndr->flags;
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
@@ -1554,7 +1554,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_nbt_sockaddr(struct ndr_pull *ndr, int ndr_f
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sa_family));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sockaddr_family));
                {
                        uint32_t _flags_save_ipv4address = ndr->flags;
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
@@ -1577,7 +1577,7 @@ _PUBLIC_ void ndr_print_nbt_sockaddr(struct ndr_print *ndr, const char *name, co
 {
        ndr_print_struct(ndr, name, "nbt_sockaddr");
        ndr->depth++;
-       ndr_print_uint32(ndr, "sa_family", r->sa_family);
+       ndr_print_uint32(ndr, "sockaddr_family", r->sockaddr_family);
        ndr_print_ipv4address(ndr, "pdc_ip", r->pdc_ip);
        ndr_print_DATA_BLOB(ndr, "remaining", r->remaining);
        ndr->depth--;
index bd55b11..2ce8fa0 100644 (file)
@@ -339,7 +339,7 @@ interface nbt
         */
 
        typedef [public,gensize] struct {
-               uint32                  sa_family;
+               uint32                  sockaddr_family;
                [flag(NDR_BIG_ENDIAN)]  ipv4address pdc_ip;
                [flag(NDR_REMAINING)]   DATA_BLOB remaining;
        } nbt_sockaddr;
index 19c8360..a33f684 100644 (file)
@@ -200,7 +200,7 @@ static NTSTATUS store_cldap_reply(TALLOC_CTX *mem_ctx,
 
        /* FIXME */
        r->sockaddr_size = 0x10; /* the w32 winsock addr size */
-       r->sockaddr.sa_family = 2; /* AF_INET */
+       r->sockaddr.sockaddr_family = 2; /* AF_INET */
        r->sockaddr.pdc_ip = talloc_strdup(mem_ctx, addr);
 
        ndr_err = ndr_push_struct_blob(&blob, mem_ctx, r,