summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ac.c3
-rw-r--r--src/hook.c2
-rw-r--r--src/wincrt.c4
3 files changed, 3 insertions, 6 deletions
diff --git a/src/ac.c b/src/ac.c
index 9bd51e0..8b163b9 100644
--- a/src/ac.c
+++ b/src/ac.c
@@ -16,9 +16,6 @@
*/
#include <stdlib.h>
-#ifdef _WIN32
-#include <immintrin.h>
-#endif
#include "alias.h"
#include "bind.h"
diff --git a/src/hook.c b/src/hook.c
index eb64cbe..9a6e885 100644
--- a/src/hook.c
+++ b/src/hook.c
@@ -60,7 +60,7 @@ void *hook_inline(void *func_, void *target) {
// dumb hack: if we hit some thunk that immediately jumps elsewhere (which
// seems common for win32 API functions), hook the underlying thing instead.
while (*func == X86_JMPIW) func += mem_loads32(func + 1) + 5;
- if (!os_mprot(func, 5, PAGE_EXECUTE_READWRITE)) return false;
+ if (!os_mprot(func, 5, PAGE_EXECUTE_READWRITE)) return 0;
int len = 0;
for (;;) {
// FIXME: these cases may result in somewhat dodgy error messaging. They
diff --git a/src/wincrt.c b/src/wincrt.c
index 8ffa6cb..177ce45 100644
--- a/src/wincrt.c
+++ b/src/wincrt.c
@@ -24,8 +24,8 @@ void *memcpy(void *restrict x, const void *restrict y, unsigned int sz) {
#ifdef __clang__
__asm__ volatile (
"rep movsb\n" :
- "=D" (x), "=S" (y), "=c" (sz) :
- "0" (x), "1" (y), "2" (sz) :
+ "+D" (x), "+S" (y), "+c" (sz) :
+ :
"memory"
);
#else // terrible fallback just in case someone wants to use this with MSVC