summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/bfin/cacheflush.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-05 16:29:53 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:35 +0200
commit8f6fc2576cadc5d1d3ea8fcbae78096ba81a847f (patch)
treedd5ce5684ff05ca5db3fe20c6609ad939082b2f8 /libc/sysdeps/linux/bfin/cacheflush.c
parentb3c8238912971355ac3c6534ef7641af6b8fc168 (diff)
cacheflush.c: compile only if __NR_cacheflush is available
The header had to be removed under the guard, else asm/cachectl.h might not be available at all. While there, disable __cachectl prototype. Use untyped strong_alias for cacheflush because char * != void *. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/bfin/cacheflush.c')
-rw-r--r--libc/sysdeps/linux/bfin/cacheflush.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/bfin/cacheflush.c b/libc/sysdeps/linux/bfin/cacheflush.c
index a8d81c419..6ff3ad560 100644
--- a/libc/sysdeps/linux/bfin/cacheflush.c
+++ b/libc/sysdeps/linux/bfin/cacheflush.c
@@ -6,9 +6,10 @@
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
-#include <unistd.h>
-#include <errno.h>
#include <sys/syscall.h>
-#include <sys/cachectl.h>
+
+#ifdef __NR_cacheflush
+# include <sys/cachectl.h>
_syscall3 (int, cacheflush, void *, start, const int, nbytes, const int, flags)
+#endif