From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30119 invoked by alias); 7 Jan 2010 00:51:47 -0000 Received: (qmail 29852 invoked by uid 22791); 7 Jan 2010 00:51:43 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mail13.aspcenter.se (HELO mail13.aspcenter.se) (194.29.119.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Jan 2010 00:51:38 +0000 Received: from mail.rd.westermo.se (Not Verified[213.132.98.37]) by mail13.aspcenter.se with MailMarshal (v6,5,4,7535) id ; Thu, 07 Jan 2010 01:51:36 +0100 X-MDAV-Processed: mail.rd.westermo.se, Thu, 07 Jan 2010 01:51:35 +0100 Received: from luthien by rd.westermo.se (MDaemon PRO v10.1.2) with ESMTP id 32-md50000011500.msg for ; Thu, 07 Jan 2010 01:51:33 +0100 X-Spam-Processed: mail.rd.westermo.se, Thu, 07 Jan 2010 01:51:33 +0100 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 192.168.254.10 X-Return-Path: jocke@vmlinux.org X-Envelope-From: jocke@vmlinux.org X-MDaemon-Deliver-To: crossgcc@sourceware.org Received: by luthien (Postfix, from userid 1000) id 3065B440005; Thu, 7 Jan 2010 01:51:32 +0100 (CET) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCH 1 of 1] A couple of low-key patches for uClibc-0.9.30.1 X-Mercurial-Node: 899a2e46d21e879dada4b55bd72f67c3567c4623 Message-Id: <899a2e46d21e879dada4.1262825446@luthien> In-Reply-To: References: User-Agent: Mercurial-patchbomb/1.3.1 Date: Thu, 07 Jan 2010 00:51:00 -0000 From: Joachim Nilsson To: "Yann E. MORIN" Cc: crossgcc@sourceware.org Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00040.txt.bz2 # HG changeset patch # User Joachim Nilsson # Date 1262824767 -3600 # Node ID 899a2e46d21e879dada4b55bd72f67c3567c4623 # Parent 9c8f68607d75b2aa10c531a3a7ab213fc5893cb0 A couple of low-key patches for uClibc-0.9.30.1 * Pack netinet structs to be possible to use for creating IP frames on big-endian targets. * Prevent clash with standard getline() function. Signed-off-by: Joachim Nilsson diff --git a/patches/uClibc/0.9.30.1/200-pack-netinet-structs.patch b/patches/uClibc/0.9.30.1/200-pack-netinet-structs.patch new file mode 100644 --- /dev/null +++ b/patches/uClibc/0.9.30.1/200-pack-netinet-structs.patch @@ -0,0 +1,224 @@ +diff -urN uClibc-0.9.30.1.orig/include/netinet/igmp.h uClibc-0.9.30.1/include/netinet/igmp.h +--- uClibc-0.9.30.1.orig/include/netinet/igmp.h 2009-04-08 09:00:10.926545132 +0200 ++++ uClibc-0.9.30.1/include/netinet/igmp.h 2009-04-08 09:00:26.242514273 +0200 +@@ -69,7 +69,7 @@ + u_int8_t igmp_code; /* routing code */ + u_int16_t igmp_cksum; /* checksum */ + struct in_addr igmp_group; /* group address */ +-}; ++} __attribute__ ((__packed__)); + + #define IGMP_MINLEN 8 + +diff -urN uClibc-0.9.30.1.orig/include/netinet/in.h uClibc-0.9.30.1/include/netinet/in.h +--- uClibc-0.9.30.1.orig/include/netinet/in.h 2009-04-08 09:00:10.926545132 +0200 ++++ uClibc-0.9.30.1/include/netinet/in.h 2009-04-08 09:00:26.242514273 +0200 +@@ -202,7 +202,7 @@ + #define s6_addr in6_u.u6_addr8 + #define s6_addr16 in6_u.u6_addr16 + #define s6_addr32 in6_u.u6_addr32 +- }; ++ } __attribute__ ((__packed__)); + + extern const struct in6_addr in6addr_any; /* :: */ + extern const struct in6_addr in6addr_loopback; /* ::1 */ +@@ -229,7 +229,7 @@ + __SOCKADDR_COMMON_SIZE - + sizeof (in_port_t) - + sizeof (struct in_addr)]; +- }; ++ } __attribute__ ((__packed__)); + #endif + + /* Ditto, for IPv6. */ +@@ -240,7 +240,7 @@ + uint32_t sin6_flowinfo; /* IPv6 flow information */ + struct in6_addr sin6_addr; /* IPv6 address */ + uint32_t sin6_scope_id; /* IPv6 scope-id */ +- }; ++ } __attribute__ ((__packed__)); + + + /* IPv4 multicast request. */ +@@ -251,7 +251,7 @@ + + /* Local IP address of interface. */ + struct in_addr imr_interface; +- }; ++ } __attribute__ ((__packed__)); + + struct ip_mreq_source + { +@@ -263,7 +263,7 @@ + + /* IP address of interface. */ + struct in_addr imr_sourceaddr; +- }; ++ } __attribute__ ((__packed__)); + + /* Likewise, for IPv6. */ + struct ipv6_mreq +@@ -273,7 +273,7 @@ + + /* local interface */ + unsigned int ipv6mr_interface; +- }; ++ } __attribute__ ((__packed__)); + + + /* Multicast group request. */ +@@ -284,7 +284,7 @@ + + /* Group address. */ + struct sockaddr_storage gr_group; +- }; ++ } __attribute__ ((__packed__)); + + struct group_source_req + { +@@ -296,7 +296,7 @@ + + /* Source address. */ + struct sockaddr_storage gsr_source; +- }; ++ } __attribute__ ((__packed__)); + + + /* Full-state filter operations. */ +@@ -315,7 +315,7 @@ + uint32_t imsf_numsrc; + /* Source addresses. */ + struct in_addr imsf_slist[1]; +- }; ++ } __attribute__ ((__packed__)); + + #define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \ + - sizeof (struct in_addr) \ +@@ -336,7 +336,7 @@ + uint32_t gf_numsrc; + /* Source addresses. */ + struct sockaddr_storage gf_slist[1]; +-}; ++} __attribute__ ((__packed__)); + + #define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \ + - sizeof (struct sockaddr_storage) \ +@@ -460,14 +460,14 @@ + { + struct in6_addr ipi6_addr; /* src/dst IPv6 address */ + unsigned int ipi6_ifindex; /* send/recv interface index */ +- }; ++ } __attribute__ ((__packed__)); + + /* IPv6 MTU information. */ + struct ip6_mtuinfo + { + struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */ + uint32_t ip6m_mtu; /* path MTU in host byte order */ +- }; ++ } __attribute__ ((__packed__)); + + + #if 0 /*def __USE_GNU*/ +diff -urN uClibc-0.9.30.1.orig/include/netinet/ip.h uClibc-0.9.30.1/include/netinet/ip.h +--- uClibc-0.9.30.1.orig/include/netinet/ip.h 2009-04-08 09:00:10.926545132 +0200 ++++ uClibc-0.9.30.1/include/netinet/ip.h 2009-04-08 09:00:26.242514273 +0200 +@@ -63,7 +63,7 @@ + u_int32_t saddr; + u_int32_t daddr; + /*The options start here. */ +- }; ++ } __attribute__ ((__packed__)); + + #ifdef __USE_BSD + /* +@@ -127,7 +127,7 @@ + u_int8_t ip_p; /* protocol */ + u_short ip_sum; /* checksum */ + struct in_addr ip_src, ip_dst; /* source and dest address */ +- }; ++ } __attribute__ ((__packed__)); + + /* + * Time stamp option structure. +diff -urN uClibc-0.9.30.1.orig/include/netinet/ip_icmp.h uClibc-0.9.30.1/include/netinet/ip_icmp.h +--- uClibc-0.9.30.1.orig/include/netinet/ip_icmp.h 2009-04-08 09:00:10.926545132 +0200 ++++ uClibc-0.9.30.1/include/netinet/ip_icmp.h 2009-04-08 09:00:26.242514273 +0200 +@@ -43,7 +43,7 @@ + u_int16_t mtu; + } frag; /* path mtu discovery */ + } un; +-}; ++} __attribute__ ((__packed__)); + + #define ICMP_ECHOREPLY 0 /* Echo Reply */ + #define ICMP_DEST_UNREACH 3 /* Destination Unreachable */ +@@ -199,7 +199,7 @@ + #define icmp_radv icmp_dun.id_radv + #define icmp_mask icmp_dun.id_mask + #define icmp_data icmp_dun.id_data +-}; ++} __attribute__ ((__packed__)); + + /* + * Lower bounds on packet lengths for various types. +diff -urN uClibc-0.9.30.1.orig/include/netinet/tcp.h uClibc-0.9.30.1/include/netinet/tcp.h +--- uClibc-0.9.30.1.orig/include/netinet/tcp.h 2009-04-08 09:00:10.926545132 +0200 ++++ uClibc-0.9.30.1/include/netinet/tcp.h 2009-04-08 09:00:26.242514273 +0200 +@@ -86,7 +86,7 @@ + u_int16_t th_win; /* window */ + u_int16_t th_sum; /* checksum */ + u_int16_t th_urp; /* urgent pointer */ +-}; ++} __attribute__ ((__packed__)); + + # else /* !__FAVOR_BSD */ + struct tcphdr +@@ -121,7 +121,7 @@ + u_int16_t window; + u_int16_t check; + u_int16_t urg_ptr; +-}; ++} __attribute__ ((__packed__)); + # endif /* __FAVOR_BSD */ + + enum +@@ -226,7 +226,7 @@ + u_int32_t tcpi_rcv_space; + + u_int32_t tcpi_total_retrans; +-}; ++} __attribute__ ((__packed__)); + + + /* For TCP_MD5SIG socket option. */ +@@ -239,7 +239,7 @@ + u_int16_t tcpm_keylen; /* Key length. */ + u_int32_t __tcpm_pad2; /* Zero. */ + u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */ +-}; ++} __attribute__ ((__packed__)); + + #endif /* Misc. */ + +diff -urN uClibc-0.9.30.1.orig/include/netinet/udp.h uClibc-0.9.30.1/include/netinet/udp.h +--- uClibc-0.9.30.1.orig/include/netinet/udp.h 2009-04-08 09:00:10.926545132 +0200 ++++ uClibc-0.9.30.1/include/netinet/udp.h 2009-04-08 09:00:26.242514273 +0200 +@@ -61,7 +61,7 @@ + u_int16_t uh_dport; /* destination port */ + u_int16_t uh_ulen; /* udp length */ + u_int16_t uh_sum; /* udp checksum */ +-}; ++} __attribute__ ((__packed__)); + + #else + +@@ -71,7 +71,7 @@ + u_int16_t dest; + u_int16_t len; + u_int16_t check; +-}; ++} __attribute__ ((__packed__)); + #endif + + #define SOL_UDP 17 /* sockopt level for UDP */ diff --git a/patches/uClibc/0.9.30.1/210-prevent-clash-with-getline.patch b/patches/uClibc/0.9.30.1/210-prevent-clash-with-getline.patch new file mode 100644 --- /dev/null +++ b/patches/uClibc/0.9.30.1/210-prevent-clash-with-getline.patch @@ -0,0 +1,30 @@ +diff -ruN uClibc-0.9.30.1.orig/extra/scripts/unifdef.c uClibc-0.9.30.1/extra/scripts/unifdef.c +--- uClibc-0.9.30.1.orig/extra/scripts/unifdef.c 2008-04-28 01:10:00.000000000 +0200 ++++ uClibc-0.9.30.1/extra/scripts/unifdef.c 2009-09-11 23:07:00.000000000 +0200 +@@ -206,7 +206,7 @@ + static void error(const char *); + static int findsym(const char *); + static void flushline(bool); +-static Linetype getline(void); ++static Linetype get_line(void); + static Linetype ifeval(const char **); + static void ignoreoff(void); + static void ignoreon(void); +@@ -512,7 +512,7 @@ + + for (;;) { + linenum++; +- lineval = getline(); ++ lineval = get_line(); + trans_table[ifstate[depth]][lineval](); + debug("process %s -> %s depth %d", + linetype_name[lineval], +@@ -526,7 +526,7 @@ + * help from skipcomment(). + */ + static Linetype +-getline(void) ++get_line(void) + { + const char *cp; + int cursym; -- For unsubscribe information see http://sourceware.org/lists.html#faq