My fix for PR274 broke the build on Darwin/PPC. As I'm fairly certain this
authorBrian Gaeke <gaeke@uiuc.edu>
Wed, 10 Mar 2004 17:38:28 +0000 (17:38 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Wed, 10 Mar 2004 17:38:28 +0000 (17:38 +0000)
bug only affects Linux systems that use GLIBC, I'm going to put ifdefs around
the array.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12269 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/JIT/Intercept.cpp

index e4b9cc1767717a0fd0e6eeaf2fa5d43751180fe2..ce93ab18674c2ee5d518d42f25b600d9bb77ab10 100644 (file)
@@ -47,16 +47,18 @@ static void runAtExitHandlers() {
 // not inlined, and hiding their real definitions in a separate archive file
 // that the dynamic linker can't see. For more info, search for
 // 'libc_nonshared.a' on Google, or read http://llvm.cs.uiuc.edu/PR274.
+#if defined(__linux__)
 void *FunctionPointers[] = {
   (void *) stat,
-  (void *) stat64,
   (void *) fstat,
-  (void *) fstat64,
   (void *) lstat,
+  (void *) stat64,
+  (void *) fstat64,
   (void *) lstat64,
   (void *) atexit,
   (void *) mknod
 };
+#endif // __linux__
 
 // NoopFn - Used if we have nothing else to call...
 static void NoopFn() {}