Closed GoogleCodeExporter closed 9 years ago
MClinker fails to build with modern gcc/glibc (archlinux). Because of missing headers for close()/STD*_FILENO. (also attached) diff --git a/lib/Support/FileHandle.cpp b/lib/Support/FileHandle.cpp index a53d37c..9d70476 100644 --- a/lib/Support/FileHandle.cpp +++ b/lib/Support/FileHandle.cpp @@ -12,6 +12,7 @@ #include <fcntl.h> #include <sys/stat.h> #include <sys/mman.h> +#include <unistd.h> using namespace mcld; diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index 5399df7..85c7069 100644 --- a/lib/Support/raw_ostream.cpp +++ b/lib/Support/raw_ostream.cpp @@ -6,6 +6,7 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#include <unistd.h> #include <mcld/Support/raw_ostream.h> using namespace mcld; diff --git a/tools/llvm-mcld/llvm-mcld.cpp b/tools/llvm-mcld/llvm-mcld.cpp index 1b3c2c0..38d759f 100644 --- a/tools/llvm-mcld/llvm-mcld.cpp +++ b/tools/llvm-mcld/llvm-mcld.cpp @@ -43,6 +43,8 @@ #include <llvm/Target/TargetData.h> #include <llvm/Target/TargetMachine.h> +#include <unistd.h> + using namespace llvm; #ifdef ENABLE_UNITTEST
Original issue reported on code.google.com by karel.t...@gmail.com on 3 Sep 2012 at 3:51
karel.t...@gmail.com
Attachments:
Fix at Revision c3998fa7b79e
Original comment by LubaTang on 4 Sep 2012 at 2:02
LubaTang
Original issue reported on code.google.com by
karel.t...@gmail.com
on 3 Sep 2012 at 3:51Attachments: