Browse Source

ldso: Fix Build warnings with common-generic ABI build

  CC ldso/ldso/ldso.oS
In file included from ./ldso/include/ldso.h:47,
                 from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h:35:1: warning: "S_ISUID" redefined
In file included from ./include/bits/kernel_stat.h:10,
                 from ./ldso/include/dl-syscall.h:31,
                 from ./ldso/include/ldso.h:47,
                 from ldso/ldso/ldso.c:33:
./include/sys/stat.h:163:1: warning: this is the location of the
previous definition
In file included from ./ldso/include/ldso.h:47,
                 from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h:36:1: warning: "S_ISGID" redefined
In file included from ./include/bits/kernel_stat.h:10,
                 from ./ldso/include/dl-syscall.h:31,
                 from ./ldso/include/ldso.h:47,
                 from ldso/ldso/ldso.c:33:
./include/sys/stat.h:164:1: warning: this is the location of the
previous definition

-----------------------------------------------------------------

Cleanly seperated the legacy ABI vs. new ABI scenario.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Vineet Gupta 12 years ago
parent
commit
d81edb9968
1 changed files with 10 additions and 1 deletions
  1. 10 1
      ldso/include/dl-syscall.h

+ 10 - 1
ldso/include/dl-syscall.h

@@ -20,10 +20,12 @@ extern int _dl_errno;
 /*  For MAP_ANONYMOUS -- differs between platforms */
 /*  For MAP_ANONYMOUS -- differs between platforms */
 #define _SYS_MMAN_H 1
 #define _SYS_MMAN_H 1
 #include <bits/mman.h>
 #include <bits/mman.h>
+
+#ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
 /* Pull in whatever this particular arch's kernel thinks the kernel version of
 /* Pull in whatever this particular arch's kernel thinks the kernel version of
  * struct stat should look like.  It turns out that each arch has a different
  * struct stat should look like.  It turns out that each arch has a different
  * opinion on the subject, and different kernel revs use different names... */
  * opinion on the subject, and different kernel revs use different names... */
-#if !defined __NR_stat || (defined(__sparc_v9__) && (__WORDSIZE == 64))
+#if defined(__sparc_v9__) && (__WORDSIZE == 64)
 #define kernel_stat64 stat
 #define kernel_stat64 stat
 #else
 #else
 #define kernel_stat stat
 #define kernel_stat stat
@@ -35,6 +37,13 @@ extern int _dl_errno;
 #define	S_ISUID		04000	/* Set user ID on execution.  */
 #define	S_ISUID		04000	/* Set user ID on execution.  */
 #define	S_ISGID		02000	/* Set group ID on execution.  */
 #define	S_ISGID		02000	/* Set group ID on execution.  */
 
 
+#else
+/* 1. common-generic ABI doesn't need kernel_stat translation
+ * 3. S_IS?ID already provided by stat.h
+ */
+#include <sys/stat.h>
+#endif
+
 
 
 /* Here are the definitions for some syscalls that are used
 /* Here are the definitions for some syscalls that are used
    by the dynamic linker.  The idea is that we want to be able
    by the dynamic linker.  The idea is that we want to be able