Build: Include unistd.h where required
Some modules require an include of unistd.h (e.g. for getcwd and isatty definitions). These changes were required to build successfully on a Fedora 17 system, using GCC 4.7.0 & glibc-headers 2.15.
This commit is contained in:
2
ispc.cpp
2
ispc.cpp
@@ -44,6 +44,8 @@
|
||||
#include <windows.h>
|
||||
#include <direct.h>
|
||||
#define strcasecmp stricmp
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <llvm/LLVMContext.h>
|
||||
#include <llvm/Module.h>
|
||||
|
||||
2
lex.ll
2
lex.ll
@@ -58,6 +58,8 @@ extern void RegisterDependency(const std::string &fileName);
|
||||
|
||||
#ifdef ISPC_IS_WINDOWS
|
||||
inline int isatty(int) { return 0; }
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif // ISPC_IS_WINDOWS
|
||||
|
||||
static int allTokens[] = {
|
||||
|
||||
Reference in New Issue
Block a user