Browse Source

win32: fix unit tests (bug #53396)

Unit tests would not build on win32 since cc.h is taken from win32 port, but
sys_arch.c is specific to the unit tests. This results in the unit tests not
having a definition of lwip_win32_platform_diag

We resolve this by guarding the define with LWIP_TESTMODE, which is not
defined for lwIP_Test, but somehow defined for lwIP_Unittests (opt.h must
be included first someplace in the include tree)
master
Joel Cunningham 8 years ago
parent
commit
194dee9956
  1. 2
      ports/win32/include/arch/cc.h

2
ports/win32/include/arch/cc.h

@ -87,8 +87,10 @@ typedef int sys_prot_t;
* C standard lwIP targets does not support this in macros, we have extra brackets
* around the arguments, which are left out in the following macro definition:
*/
#if !defined(LWIP_TESTMODE) || !LWIP_TESTMODE
void lwip_win32_platform_diag(const char *format, ...);
#define LWIP_PLATFORM_DIAG(x) lwip_win32_platform_diag x
#endif
#ifndef LWIP_NORAND
extern unsigned int sys_win_rand(void);

Loading…
Cancel
Save