- Mitglied seit
- 30 Jul 2005
- Beiträge
- 1,493
- Punkte für Reaktionen
- 0
- Punkte
- 0
Hi, ich habe einen Patch erstellt, mit dem man die uClibc 0.9.26 mit dem gcc4 Compiler bauen kann (diffs zwischen 0.9.26 und 0.9.28 zur Hilfe genommen). Könnte mir jetzt noch jemand bestätigen, dass der Patch keine Probleme mit den kompilierten Programmen von AVM machen wird.
Mfg
danisahne
Der Patch:
Mfg
danisahne
Der Patch:
Code:
--- uClibc-0.9.26.orig/include/rpc/xdr.h 2006-12-03 18:08:00.000000000 +0100
+++ uClibc-0.9.26/include/rpc/xdr.h 2006-12-03 18:10:43.000000000 +0100
@@ -274,9 +274,9 @@
* in the RPC code will not work on 64bit Solaris platforms !
*/
#define IXDR_GET_LONG(buf) \
- ((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))
+ ((long) ntohl((u_long) (((u_int32_t *)(buf = (void *)(((char *) buf) + sizeof(u_int32_t))))[-1]) ))
#define IXDR_PUT_LONG(buf, v) \
- (*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))
+ (((u_int32_t *)(buf = (void *)(((char *) buf) + sizeof(u_int32_t))))[-1]) = (long)htonl((u_long)(v))
#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG(buf, (long)(v))
--- uClibc-0.9.26.orig/libc/inet/rpc/auth_none.c 2004-04-06 18:00:37.000000000 +0200
+++ uClibc-0.9.26/libc/inet/rpc/auth_none.c 2006-12-03 17:31:01.000000000 +0100
@@ -64,7 +64,7 @@
u_int mcnt;
};
#ifdef __UCLIBC_HAS_THREADS__
-#define authnone_private ((struct authnone_private_s *)RPC_THREAD_VARIABLE(authnone_private_s))
+#define authnone_private (*(struct authnone_private_s **)&RPC_THREAD_VARIABLE(authnone_private_s))
#else
static struct authnone_private_s *authnone_private;
#endif
@@ -105,7 +105,7 @@
{
struct authnone_private_s *ap;
- ap = (struct authnone_private_s *) authnone_private;
+ ap = authnone_private;
if (ap == NULL)
return FALSE;
return (*xdrs->x_ops->x_putbytes) (xdrs, ap->marshalled_client, ap->mcnt);
--- uClibc-0.9.26.orig/libc/inet/rpc/clnt_perror.c 2004-04-06 18:00:37.000000000 +0200
+++ uClibc-0.9.26/libc/inet/rpc/clnt_perror.c 2006-12-03 17:36:07.000000000 +0100
@@ -58,7 +58,7 @@
* buf variable in a few functions. Overriding a global variable
* with a local variable of the same name is a bad idea, anyway.
*/
-#define buf ((char *)RPC_THREAD_VARIABLE(clnt_perr_buf_s))
+#define buf (*(char **)&RPC_THREAD_VARIABLE(clnt_perr_buf_s))
#else
static char *buf;
#endif
@@ -425,7 +425,7 @@
}
-static void __attribute__ ((unused))
+static void __attribute_used__
free_mem (void)
{
free (buf);
--- uClibc-0.9.26.orig/libc/inet/rpc/clnt_raw.c 2004-04-06 18:00:37.000000000 +0200
+++ uClibc-0.9.26/libc/inet/rpc/clnt_raw.c 2006-12-03 17:38:58.000000000 +0100
@@ -62,7 +62,7 @@
u_int mcnt;
};
#ifdef __UCLIBC_HAS_THREADS__
-#define clntraw_private ((struct clntraw_private_s *)RPC_THREAD_VARIABLE(clntraw_private_s))
+#define clntraw_private (*(struct clntraw_private_s **)&RPC_THREAD_VARIABLE(clntraw_private_s))
#else
static struct clntraw_private_s *clntraw_private;
#endif
--- uClibc-0.9.26.orig/libc/inet/rpc/clnt_simple.c 2004-04-06 18:00:37.000000000 +0200
+++ uClibc-0.9.26/libc/inet/rpc/clnt_simple.c 2006-12-03 17:40:52.000000000 +0100
@@ -58,7 +58,7 @@
char *oldhost;
};
#ifdef __UCLIBC_HAS_THREADS__
-#define callrpc_private ((struct callrpc_private_s *)RPC_THREAD_VARIABLE(callrpc_private_s))
+#define callrpc_private (*(struct callrpc_private_s **)&RPC_THREAD_VARIABLE(callrpc_private_s))
#else
static struct callrpc_private_s *callrpc_private;
#endif
--- uClibc-0.9.26.orig/libc/inet/rpc/svc.c 2004-04-06 18:00:37.000000000 +0200
+++ uClibc-0.9.26/libc/inet/rpc/svc.c 2006-12-03 18:13:11.000000000 +0100
@@ -48,7 +48,7 @@
#include <sys/poll.h>
#ifdef __UCLIBC_HAS_THREADS__
-#define xports ((SVCXPRT **)RPC_THREAD_VARIABLE(svc_xports_s))
+#define xports (*(SVCXPRT ***)&RPC_THREAD_VARIABLE(svc_xports_s))
#else
static SVCXPRT **xports;
#endif
@@ -67,7 +67,7 @@
void (*sc_dispatch) (struct svc_req *, SVCXPRT *);
};
#ifdef __UCLIBC_HAS_THREADS__
-#define svc_head ((struct svc_callout *)RPC_THREAD_VARIABLE(svc_head_s))
+#define svc_head (*(struct svc_callout **)&RPC_THREAD_VARIABLE(svc_head_s))
#else
static struct svc_callout *svc_head;
#endif
--- uClibc-0.9.26.orig/libc/inet/rpc/svc_simple.c 2004-04-06 18:00:37.000000000 +0200
+++ uClibc-0.9.26/libc/inet/rpc/svc_simple.c 2006-12-03 18:15:16.000000000 +0100
@@ -64,7 +64,7 @@
struct proglst_ *p_nxt;
};
#ifdef __UCLIBC_HAS_THREADS__
-#define proglst ((struct proglst_ *)RPC_THREAD_VARIABLE(svcsimple_proglst_s))
+#define proglst (*(struct proglst_ **)&RPC_THREAD_VARIABLE(svcsimple_proglst_s))
#else
static struct proglst_ *proglst;
#endif
@@ -72,7 +72,7 @@
static void universal (struct svc_req *rqstp, SVCXPRT *transp_s);
#ifdef __UCLIBC_HAS_THREADS__
-#define transp ((SVCXPRT *)RPC_THREAD_VARIABLE(svcsimple_transp_s))
+#define transp (*(SVCXPRT **)&RPC_THREAD_VARIABLE(svcsimple_transp_s))
#else
static SVCXPRT *transp;
#endif
--- uClibc-0.9.26.orig/libc/sysdeps/linux/common/llseek.c 2004-04-06 18:00:37.000000000 +0200
+++ uClibc-0.9.26/libc/sysdeps/linux/common/llseek.c 2006-12-03 18:19:09.000000000 +0100
@@ -49,15 +49,13 @@
return(loff_t)(INLINE_SYSCALL (_llseek, 5, fd, (off_t) (offset >> 32),
(off_t) (offset & 0xffffffff), &result, whence) ?: result);
}
-weak_alias(__libc_lseek64, llseek);
-weak_alias(__libc_lseek64, lseek64);
#else
extern __off_t __libc_lseek(int fildes, off_t offset, int whence);
loff_t __libc_lseek64(int fd, loff_t offset, int whence)
{
return(loff_t)(__libc_lseek(fd, (off_t) (offset & 0xffffffff), whence));
}
-weak_alias(__libc_lseek, llseek)
-weak_alias(__libc_lseek, lseek64)
#endif
+weak_alias(__libc_lseek64, llseek);
+weak_alias(__libc_lseek64, lseek64);