$OpenBSD: patch-js_src_ctypes_libffi_src_mips_ffi_c,v 1.1 2011/06/28 22:01:18 landry Exp $

Allow building this on OpenBSD, where we don't provide the ICACHE related
defines in cachectl.h, but in sysarch.h.

--- js/src/ctypes/libffi/src/mips/ffi.c.orig	Fri Apr 15 10:03:18 2011
+++ js/src/ctypes/libffi/src/mips/ffi.c	Fri Apr 15 10:03:36 2011
@@ -37,7 +37,11 @@
 #endif
 
 #ifndef USE__BUILTIN___CLEAR_CACHE
-#include <sys/cachectl.h>
+#  if defined(__OpenBSD__)
+#    include <mips64/sysarch.h>
+#  else
+#    include <sys/cachectl.h>
+#  endif
 #endif
 
 #ifdef FFI_DEBUG
