Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/builtins/clear_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
#endif

#if defined(__mips__)
#include <features.h>
// Rust: For some strange reason __USE_MISC isn't being defined so
// we don't get the definition of syscall. Force it to be defined.
#define __USE_MISC
#include <unistd.h>
#include <sys/cachectl.h>
#include <sys/syscall.h>
#include <unistd.h>
#if defined(__ANDROID__) && defined(__LP64__)
/*
* clear_mips_cache - Invalidates instruction cache for Mips.
Expand Down
13 changes: 13 additions & 0 deletions lib/builtins/int_endianness.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@

#endif /* Windows */

#if defined(__linux__)
#include <endian.h>

#if __BYTE_ORDER == __BIG_ENDIAN
#define _YUGA_LITTLE_ENDIAN 0
#define _YUGA_BIG_ENDIAN 1
#elif __BYTE_ORDER == __LITTLE_ENDIAN
#define _YUGA_LITTLE_ENDIAN 1
#define _YUGA_BIG_ENDIAN 0
#endif /* __BYTE_ORDER */

#endif /* GNU/Linux */

#endif /* Clang or GCC. */

/* . */
Expand Down
Loading