Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/networking/dnsd.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 987 by niro, Sun May 30 11:32:42 2010 UTC revision 988 by niro, Sun May 30 11:41:13 2010 UTC
# Line 44  struct dns_head { Line 44  struct dns_head {
44   uint16_t nauth;   uint16_t nauth;
45   uint16_t nadd;   uint16_t nadd;
46  };  };
47    /* Structure used to access type and class fields.
48     * They are totally unaligned, but gcc 4.3.4 thinks that pointer of type uint16_t*
49     * is 16-bit aligned and replaces 16-bit memcpy (in move_from_unaligned16 macro)
50     * with aligned halfword access on arm920t!
51     * Oh well. Slapping PACKED everywhere seems to help: */
52  struct dns_prop {  struct dns_prop {
53   uint16_t type;   uint16_t type PACKED;
54   uint16_t class;   uint16_t class PACKED;
55  };  } PACKED;
56  /* element of known name, ip address and reversed ip address */  /* element of known name, ip address and reversed ip address */
57  struct dns_entry {  struct dns_entry {
58   struct dns_entry *next;   struct dns_entry *next;
# Line 459  int dnsd_main(int argc UNUSED_PARAM, cha Line 464  int dnsd_main(int argc UNUSED_PARAM, cha
464   unsigned lsa_size;   unsigned lsa_size;
465   int udps, opts;   int udps, opts;
466   uint16_t port = 53;   uint16_t port = 53;
467   uint8_t buf[MAX_PACK_LEN + 1];   /* Ensure buf is 32bit aligned (we need 16bit, but 32bit can't hurt) */
468     uint8_t buf[MAX_PACK_LEN + 1] ALIGN4;
469    
470   opts = getopt32(argv, "vi:c:t:p:d", &listen_interface, &fileconf, &sttl, &sport);   opts = getopt32(argv, "vi:c:t:p:d", &listen_interface, &fileconf, &sttl, &sport);
471   //if (opts & 0x1) // -v   //if (opts & 0x1) // -v

Legend:
Removed from v.987  
changed lines
  Added in v.988