aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bitcode')
-rw-r--r--lib/Bitcode/Writer/BitWriter.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Bitcode/Writer/BitWriter.cpp b/lib/Bitcode/Writer/BitWriter.cpp
index 1aac500..8834964 100644
--- a/lib/Bitcode/Writer/BitWriter.cpp
+++ b/lib/Bitcode/Writer/BitWriter.cpp
@@ -28,7 +28,7 @@ int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) {
return 0;
}
-#ifdef __GNUC__
+#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR >= 4)
#include <ext/stdio_filebuf.h>
// FIXME: Control this with configure? Provide some portable abstraction in
@@ -49,4 +49,10 @@ int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
return 0;
}
+#else
+
+int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
+ return -1; // Not supported.
+}
+
#endif