Bug 801295 - mincore() call has incorrect type on tier3 (non-Linux). r=jlebar
--- a/js/src/vm/Stack.cpp
+++ b/js/src/vm/Stack.cpp
@@ -822,22 +822,21 @@ StackSpace::sizeOf()
* which are swapped out to disk. We really should, but what we have here
* is better than counting the whole stack!
*/
const int pageSize = getpagesize();
size_t numBytes = (trustedEnd_ - base_) * sizeof(Value);
size_t numPages = (numBytes + pageSize - 1) / pageSize;
- // On Linux, mincore's third argument has type unsigned char*. On Mac, it
- // has type char*.
-#if defined(XP_MACOSX)
+ // On Linux, mincore's third argument has type unsigned char*.
+#ifdef __linux__
+ typedef unsigned char MincoreArgType;
+#else
typedef char MincoreArgType;
-#else
- typedef unsigned char MincoreArgType;
#endif
MincoreArgType *vec = (MincoreArgType *) js_malloc(numPages);
int result = mincore(base_, numBytes, vec);
if (result) {
js_free(vec);
/*
* If mincore fails us, return the vsize (like we do below if we're not