Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit a4f8e8c

Browse files
committed
Rust: Fix clear_cache on MIPS
1 parent 8b0309b commit a4f8e8c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/builtins/clear_cache.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@
2424
#endif
2525

2626
#if defined(__mips__)
27+
#include <features.h>
28+
// Rust: For some strange reason __USE_MISC isn't being defined so
29+
// we don't get the definition of syscall. Force it to be defined.
30+
#define __USE_MISC
31+
#include <unistd.h>
2732
#include <sys/cachectl.h>
2833
#include <sys/syscall.h>
29-
#include <unistd.h>
3034
#if defined(__ANDROID__) && defined(__LP64__)
3135
/*
3236
* clear_mips_cache - Invalidates instruction cache for Mips.

0 commit comments

Comments
 (0)