Compile fails with nxd_bsd.h issues

I'm using IAR 8.1 and having some incompatibilities with nxd_bsd.h.  Any ideas on how I can resolve this?

 

   IAR ANSI C/C++ Compiler V8.21.1.14461/W32 for ARM
   Copyright 1999-2017 IAR Systems AB.
   Standalone license - IAR Embedded Workbench for Renesas Synergy 7.71

  #define EILSEQ          84  /* Illegal byte sequence */
          ^
"Y:\test1\synergy\ssp\inc\framework\el\nxd\nxd_bsd.h",436  Warning[Pa181]: incompatible redefinition of macro "EILSEQ" (declared at line 36 of "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.100 EWSYN\arm\inc\c\errno.h")

  typedef LONG        time_t;
                      ^
"Y:\test1\synergy\ssp\inc\framework\el\nxd\nxd_bsd.h",552  Error[Pe256]: invalid redeclaration of type name "time_t" (declared at line 40 of "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.100 EWSYN\arm\inc\c\time32.h")

  #define errno (_nxd_get_errno())
          ^
"Y:\test1\synergy\ssp\inc\framework\el\nxd\nxd_bsd.h",898  Warning[Pa181]: incompatible redefinition of macro "errno" (declared at line 52 of "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.100 EWSYN\arm\inc\c\errno.h")

  • Hello klow,

    can the project be built successfully, despite these warnings? Which version of SSP do you use? I tried to reproduce that issue with SSP 1.4.0 and did not get such warnings.

    I found information that there was an issue with the invalid redeclaration of type name "time_t" in case of IAR C compiler + SSP 1.3.2. The suggested workaround in that case is apparently to modify the nxd_bsd.h file as follows:

    Before change:
    #ifndef __time_t_defined
    After change:
    #if !defined(__time_t_defined) && !defined(_DLIB_TIME_USES_64)

    Best regards,
    anper

  • In reply to anper:

    Thanks for the suggestion. I had upgraded to e2 6.2, ssp 1.4, and iar 8.x and having a few issues migrating. I have gone back to the previous versions for now. Will try again when I have more time.