Skip to content

Commit

Permalink
Add missing string.h include to wasm-rt-impl.c (#1010)
Browse files Browse the repository at this point in the history
Addresses:

gcc -I/tmp/wabt/wasm2c -O3 /tmp/wabt/wasm2c/wasm-rt-impl.c -o wasm-rt-impl.o
/tmp/wabt/wasm2c/wasm-rt-impl.c: In function ‘wasm_rt_grow_memory’:
/tmp/wabt/wasm2c/wasm-rt-impl.c:111:3: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration]
   memset(memory->data + old_pages * PAGE_SIZE, 0, delta * PAGE_SIZE);
   ^~~~~~
/tmp/wabt/wasm2c/wasm-rt-impl.c:111:3: warning: incompatible implicit declaration of built-in function ‘memset’
/tmp/wabt/wasm2c/wasm-rt-impl.c:111:3: note: include ‘<string.h>’ or provide a declaration of ‘memset’
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'

with gcc (Debian 6.3.0-18+deb9u1).
  • Loading branch information
thewtex authored and binji committed Feb 11, 2019
1 parent 86ca882 commit 800a453
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wasm2c/wasm-rt-impl.c
Expand Up @@ -21,6 +21,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#define PAGE_SIZE 65536

Expand Down

0 comments on commit 800a453

Please sign in to comment.