EE: Provide the symbol "lseek64" explicitly with <unistd.h> on Linux glibc.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 14 Aug 2011 00:34:04 +0000 (00:34 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 14 Aug 2011 00:34:04 +0000 (00:34 +0000)
With libcxx, it seems <unistd.h> would not be provided. Thanks to Ryuta Suzuki.

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

lib/ExecutionEngine/JIT/Intercept.cpp
lib/ExecutionEngine/MCJIT/Intercept.cpp

index fa8bee4604277987be2500e1fdd5e40470006a24..2251a8e6b077b611933b065fb3283534e6d00357 100644 (file)
@@ -52,6 +52,7 @@ static void runAtExitHandlers() {
 #include <sys/stat.h>
 #endif
 #include <fcntl.h>
+#include <unistd.h>
 /* stat functions are redirecting to __xstat with a version number.  On x86-64
  * linking with libc_nonshared.a and -Wl,--export-dynamic doesn't make 'stat'
  * available as an exported symbol, so we have to add it explicitly.
index e431c848d630fb4d66491f3f6cdc45677febc710..f83f4282e01651a4b568428b2cb9d28f3972b1de 100644 (file)
@@ -52,6 +52,7 @@ static void runAtExitHandlers() {
 #include <sys/stat.h>
 #endif
 #include <fcntl.h>
+#include <unistd.h>
 /* stat functions are redirecting to __xstat with a version number.  On x86-64
  * linking with libc_nonshared.a and -Wl,--export-dynamic doesn't make 'stat'
  * available as an exported symbol, so we have to add it explicitly.