AnsweredAssumed Answered

Is this bug? timezone definition in syscalls.c generated by cube mx

Question asked by Nick Steele on Oct 6, 2017
Latest reply on Nov 8, 2017 by Raivis Strogonovs

While compiling a project with syscalls.c generated by cube mx, there is a block like this:


  #ifdef _SYS_TIME_H_
  struct timezone {
    int tz_minuteswest; /* minutes west of Greenwich */
    int tz_dsttime; /* type of dst correction */



and the file includes <time.h> at top. Since _SYS_TIME_H_ is defined in time.h, syscall.c redefines the timezone struct causing a compiler error. My guess is that it is supposed to be #ifndef _SYS_TIME_H_ ? I'm circumventing the error by adding  a preceding "#undef _SYS_TIME_H_" to syscalls.c in a /* USER CODE BEGIN */ section.