chip-8

chip-8 emulator

pedantic fallbacks for sys and argc

Arjun Choudhary contact@arjunchoudhary.com

commit: ee92b22 parent: 0a21433

1 files changed, 3 insertions(+), 0 deletions(-)
MODmain.c+3-0
MOD · main.c +3 -0
--- a/main.c
+++ b/main.c
@@ -10,6 +10,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
+#include <sys/types.h>
 
 /*** data ***/
 // opcode store
@@ -561,8 +562,10 @@ SDL_Scancode keymappings[16] = {
     SDL_SCANCODE_Z, SDL_SCANCODE_X, SDL_SCANCODE_C, SDL_SCANCODE_V
 };
 
+int usleep(unsigned int usec);
 int main(int argc, char* argv[])
 {
+    (void)argc;
     const Uint8* state = SDL_GetKeyboardState(NULL);
     chip8_initialize();
     chip8_load_program(argv[1]);