diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-04-05 16:29:53 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:35 +0200 |
commit | 8f6fc2576cadc5d1d3ea8fcbae78096ba81a847f (patch) | |
tree | dd5ce5684ff05ca5db3fe20c6609ad939082b2f8 /libc/sysdeps/linux/mips | |
parent | b3c8238912971355ac3c6534ef7641af6b8fc168 (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/mips')
-rw-r--r-- | libc/sysdeps/linux/mips/cacheflush.c | 6 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/sys/cachectl.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/mips/cacheflush.c b/libc/sysdeps/linux/mips/cacheflush.c index 235414dbd..15a344292 100644 --- a/libc/sysdeps/linux/mips/cacheflush.c +++ b/libc/sysdeps/linux/mips/cacheflush.c @@ -16,15 +16,15 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include <errno.h> -#include <unistd.h> #include <sys/syscall.h> #ifdef __NR_cacheflush +# include <sys/cachectl.h> _syscall3(int, cacheflush, void *, addr, const int, nbytes, const int, op) -strong_alias(cacheflush, _flush_cache) +strong_alias_untyped(cacheflush, _flush_cache) #endif #ifdef __NR_cachectl +# include <sys/cachectl.h> _syscall3(int, cachectl, void *, addr, const int, nbytes, const int, op) #endif diff --git a/libc/sysdeps/linux/mips/sys/cachectl.h b/libc/sysdeps/linux/mips/sys/cachectl.h index a93e1fb6d..805c78527 100644 --- a/libc/sysdeps/linux/mips/sys/cachectl.h +++ b/libc/sysdeps/linux/mips/sys/cachectl.h @@ -31,7 +31,9 @@ __BEGIN_DECLS #ifdef __USE_MISC extern int cachectl (void *addr, __const int nbytes, __const int op) __THROW; #endif +#if 0 extern int __cachectl (void *addr, __const int nbytes, __const int op) __THROW; +#endif #ifdef __USE_MISC extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW; #endif |