소스 검색

- fix !LFS case for i386

Bernhard Reutner-Fischer 16 년 전
부모
커밋
e64b639214
2개의 변경된 파일12개의 추가작업 그리고 7개의 파일을 삭제
  1. 4 2
      libc/sysdeps/linux/i386/posix_fadvise.c
  2. 8 5
      libc/sysdeps/linux/i386/posix_fadvise64.S

+ 4 - 2
libc/sysdeps/linux/i386/posix_fadvise.c

@@ -13,11 +13,13 @@
 
 
 #if defined __NR_fadvise64_64 || defined __NR_fadvise64
-libc_hidden_proto(posix_fadvise64)
+extern int __libc_posix_fadvise64 (int, __off64_t, __off64_t, int ) __THROW;
+
+libc_hidden_proto(__libc_posix_fadvise64)
 libc_hidden_proto(posix_fadvise)
 int posix_fadvise(int fd, off_t offset, off_t len, int advice)
 {
-	if (posix_fadvise64(fd, offset, len, advice) != 0)
+	if (__libc_posix_fadvise64(fd, offset, len, advice) != 0)
 		return errno;
 	return 0;
 }

+ 8 - 5
libc/sysdeps/linux/i386/posix_fadvise64.S

@@ -23,9 +23,9 @@
 #include <sys/syscall.h>
 
 .text
-.global posix_fadvise64
-.type   posix_fadvise64,%function
-posix_fadvise64:
+.global __libc_posix_fadvise64
+.type   __libc_posix_fadvise64,%function
+__libc_posix_fadvise64:
 #if defined __NR_fadvise64_64 && defined __UCLIBC_HAS_LFS__
 	/* Save regs  */
 	pushl	%ebp
@@ -92,7 +92,10 @@ overflow:
 	/* Successful; return the syscall's value.  */
 	ret
 
-.size posix_fadvise64,.-posix_fadvise64
+.size __libc_posix_fadvise64,.-__libc_posix_fadvise64
 
-libc_hidden_def(posix_fadvise64)
+libc_hidden_def(__libc_posix_fadvise64)
+#if defined __UCLIBC_HAS_LFS__
+weak_alias(__libc_posix_fadvise64,posix_fadvise64)
+#endif