Testing this patch right now but, I'm fairly certain that it's going to work. If you want the short and sweet version see the attached patch, else read on.
Looking at "sysdeps/unix/sysv/linux/openat.c" on line 31 I see. #if !defined OPENAT && !defined __ASSUME_ATFCTS # define OPENAT openat This is the only place where OPENAT is defined with a conditional. __ASSUME_ATFCTS is defined in "sysdeps/unix/sysv/linux/kernel-features.h" with this block of code, That chunk starting on line 464. This is the last think in the file. /* The *at syscalls were introduced just after 2.6.16-rc1. Due to the way the kernel versions are advertised we can only rely on 2.6.17 to have the code. */ #if __LINUX_KERNEL_VERSION >= 0x020611 \ && (defined __i386__ || defined __x86_64__) # define __ASSUME_ATFCTS 1 #endif The kernel version for 2.6.17 is 0x20611. Now, We just need to figure out when __ASSUME_ATFCTS became independent. So I went to take a look at, http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/kernel-features.h?cvsroot=glibc and got some good info. I know that in rev 1.91 __ASSUME_ATFCTS was added to "sysdeps/unix/sysv/linux/kernel-features.h" So, In the past say rev 1.1 of "sysdeps/unix/sysv/linux/openat.c" OPENAT was set with the following, #ifndef OPENAT #define OPENAT openat The change happened between rev 1.2 and 1.3 of that file, http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/openat.c.diff?cvsroot=glibc&only_with_tag=MAIN&r1=text&tr1=1.2&r2=text&tr2=1.3&f=u , The description is just "Use syscall if available." which leaves me in the dark about that. But if my logic isn't flawed, the #define OPENAT openat needs to be put in it's own ifndef below the #if !defined OPENAT && !defined __ASSUME_ATFCTS. See the patch. The things people do on their time off!
Submitted By: Joe Ciccone <[EMAIL PROTECTED]> Date: 2006-08-17 Initial Package Version: 2.4 Upstream Status: Unknown Origin: Joe Ciccone Description: Fixes the logic that decides if OPENAT gets defined or not. diff -Naur glibc-2.4.orig/sysdeps/unix/sysv/linux/openat.c glibc-2.4/sysdeps/unix/sysv/linux/openat.c --- glibc-2.4.orig/sysdeps/unix/sysv/linux/openat.c 2006-03-01 00:32:42.000000000 -0500 +++ glibc-2.4/sysdeps/unix/sysv/linux/openat.c 2006-08-17 11:22:16.000000000 -0400 @@ -29,8 +29,6 @@ #if !defined OPENAT && !defined __ASSUME_ATFCTS -# define OPENAT openat - /* Set errno after a failed call. If BUF is not null, it is a /proc/self/fd/ path name we just tried to use. */ void @@ -63,6 +61,9 @@ int __have_atfcts; #endif +#ifndef OPENAT +# define OPENAT openat +#endif #define OPENAT_NOT_CANCEL CONCAT (OPENAT) #define CONCAT(name) CONCAT2 (name)
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page