tetris icon indicating copy to clipboard operation
tetris copied to clipboard

wait function redeclared (from sys/wait.h) on OSX

Open dannyvankooten opened this issue 6 years ago • 1 comments

Hello, thank you for putting this out there. Just wanted to give you a quick heads up that trying to compile this on OSX generated the following error for me.

I'm super new to C so not sure about the cleanest way to address this, otherwise I would have sent a PR. Simply renaming the function, I guess?

$ make
gcc -m64 -std=gnu17 -s -Wall -Os -l pthread -o tetris tetris.c
tetris.c:196:7: error: conflicting types for 'wait'
void* wait(void*);
      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/wait.h:248:9: note: 
      previous declaration is here
pid_t   wait(int *) __DARWIN_ALIAS_C(wait);

dannyvankooten avatar Feb 17 '20 20:02 dannyvankooten

Maybe. Linux is my main platform, the Shell version is full featured and is almost perfect enough, the other ones may no longer be maintained. Please try the Shell one and in full screen mode.

deepgrace avatar Feb 19 '20 06:02 deepgrace