Bernhard,

> >> Attached patch fixes this:
> >>
> >>  LD libuClibc-0.9.33.so
> >> libc/libc_so.a(stubs.os): In function `sync_file_range':
> >> stubs.c:(.text+0x0): multiple definition of `ioperm'
> >> libc/libc_so.a(ioperm.os):ioperm.c:(.text+0x260): first defined here
> >> libc/libc_so.a(stubs.os): In function `sync_file_range':
> >> stubs.c:(.text+0x0): multiple definition of `iopl'
> >> libc/libc_so.a(iopl.os):iopl.c:(.text+0x0): first defined here
> >> collect2: ld returned 1 exit status
> >> make[1]: *** [lib/libc.so] Error 1
> 
> Applied to master.
> Thanks!
 
Here is an update, reducing the code guarded by the #ifdef.  The
previous caused later usage errors with in* and out* not being
available.


take care,
jason
>From cff293112af42045c0421dcfd3d9cd1ddd15eb8a Mon Sep 17 00:00:00 2001
From: Jason Woodward <[email protected]>
Date: Mon, 26 Mar 2012 10:13:21 -0400
Subject: [PATCH] ioperm: reduce code guarded by ifdef __NR_ioperm

Signed-off-by: Jason Woodward <[email protected]>
---
 libc/sysdeps/linux/arm/ioperm.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/libc/sysdeps/linux/arm/ioperm.c b/libc/sysdeps/linux/arm/ioperm.c
index 0e283cb..dcb8280 100644
--- a/libc/sysdeps/linux/arm/ioperm.c
+++ b/libc/sysdeps/linux/arm/ioperm.c
@@ -50,8 +50,6 @@
 
 #include <linux/version.h>
 
-#ifdef __NR_ioperm
-
 #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
 #define PATH_CPUINFO		"/proc/cpuinfo"
 
@@ -173,6 +171,7 @@ init_iosys (void)
     return -1;
 }
 
+#ifdef __NR_ioperm
 int ioperm (unsigned long int from, unsigned long int num, int turn_on)
 {
     if (! io.initdone && init_iosys () < 0)
@@ -204,6 +203,7 @@ int ioperm (unsigned long int from, unsigned long int num, int turn_on)
     return 0;
 }
 libc_hidden_def(ioperm)
+#endif
 
 
 void
@@ -246,5 +246,3 @@ inl(unsigned long int port)
 {
     return *((__volatile__ unsigned long *)(IO_ADDR (port)));
 }
-
-#endif
-- 
1.7.0.4

_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to