aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/intertyper.js4
-rw-r--r--src/library.js4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 7743ce62..323787ac 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -350,7 +350,9 @@ function intertyper(lines, sidePass, baseLineNums) {
triple = triple.substr(1, triple.length-2);
var expected = TARGET_ASMJS_UNKNOWN_EMSCRIPTEN ? 'asmjs-unknown-emscripten' : 'i386-pc-linux-gnu';
if (triple !== expected) {
- warn('using an unexpected LLVM triple: ' + [triple, ' !== ', expected] + ' (are you using emcc for everything and not clang?)');
+ if (!(TARGET_ASMJS_UNKNOWN_EMSCRIPTEN && triple === 'le32-unknown-nacl')) {
+ warn('using an unexpected LLVM triple: ' + [triple, ' !== ', expected] + ' (are you using emcc for everything and not clang?)');
+ }
}
}
return null;
diff --git a/src/library.js b/src/library.js
index 18a794fd..cd451c57 100644
--- a/src/library.js
+++ b/src/library.js
@@ -2420,7 +2420,9 @@ LibraryManager.library = {
fileno: function(stream) {
// int fileno(FILE *stream);
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fileno.html
- return FS.getStreamFromPtr(stream).fd;
+ stream = FS.getStreamFromPtr(stream);
+ if (!stream) return -1;
+ return stream.fd;
},
ftrylockfile: function() {
// int ftrylockfile(FILE *file);