33d / gbsim-win

An obsolete environment for building gbsim with Windows - use https://github.com/33d/gbsim instead
6 stars 3 forks source link

error: 'usleep' is deprecated #2

Open Grahack opened 9 years ago

Grahack commented 9 years ago

Hi, Another error:

make[3]: Entering directory `/gbsim-win/gbsim/simavr'
sim/sim_avr.c: In function 'avr_callback_sleep_raw':
sim/sim_avr.c:305:3: error: 'usleep' is deprecated (declared at c:\mingw\include\unistd.h:129) [-Werror=deprecated-declarations]
   usleep(usec);
   ^
cc1.exe: all warnings being treated as errors
make[3]: *** [obj-mingw32/sim_avr.o] Error 1

Is there a workaround ? Would this be interesting ? http://stackoverflow.com/questions/5801813/c-usleep-is-obsolete-workarounds-for-windows-mingw

33d commented 9 years ago

That looks like an issue with simavr, maybe search for that. I guess the easy fix is to remove -Wall from gbsim/Makefile.common.