On 2010-11-26 13:39, Pontus Carlsson wrote:
People might encounter errors trying to compile latest revision of EGLIBC with the following error;

stat.c:50:1: error: redefinition of '__stat'
../include/sys/stat.h:22:23: note: previous definition of '__stat' was here

I found the following patch to work at least through the compilation, I'm not yet finished with the system so I can't really leave any review on whether or not this fix breaks anything else. Lord knows I'm no C/C++ developer, although I do know logic overall and considering the comment above this function definition (io/stat.c) I sort of think that this approach isn't correct.

I'd bee glad if someone could confirm and perhaps provide a better approach on this issue.

Patch:

--- eglibc-2.12-12130.original/io/stat.c 2010-11-25 23:05:31.000000000 +0100
+++ eglibc-2.12-12130/io/stat.c 2010-11-26 12:21:43.016668816 +0100
@@ -44,6 +44,7 @@
    functions in the shared library can adapt without needing to recompile
    all callers.  */

+#ifndef stat
 #undef stat
 int
 attribute_hidden
@@ -53,3 +54,4 @@
 }

 weak_hidden_alias (__stat, stat)
+#endif


Also, the versions I'm running (for the toolchain) is the following:
# Linux-Headers 2.6.36.1
# File 5.04
# Ncurses 5.7 (Patched up to 20101120)
# GMP 5.0.1
# MPFR 3.0.0
# MPC 0.8.2
# PPL 0.11
# CLooG-PPL 0.15.10
# Binutils 2.20.1
# GCC 4.5.1


_______________________________________________
Clfs-support mailing list
[email protected]
http://lists.cross-lfs.org/listinfo.cgi/clfs-support-cross-lfs.org
Everyone should ignore this patch as it completely disables stat, which is for example used by findutils. I'm sorry about this missunderstanding and I promise I'll doublecheck my fixes in the future.

Apologies
_______________________________________________
Clfs-support mailing list
[email protected]
http://lists.cross-lfs.org/listinfo.cgi/clfs-support-cross-lfs.org

Reply via email to