mirror of https://github.com/wolfSSL/wolfssl.git
settings: keep the Zephyr platform block away from the assembler
The WOLFSSL_ZEPHYR block includes <zephyr/kernel.h> and friends and declares z_realloc. Assembly reaches settings.h through libwolfssl_sources_asm.h, so the assembler got all of it and stopped at the first C declaration: stddef.h:160: Error: no such instruction: `typedef long int ptrdiff_t' That makes every wolfSSL .S file unbuildable on Zephyr, on any architecture - reproduced on x86_64 and on a Cortex-M33. Ports using the *_c.c inline variants never noticed, since those are compiled as C. Guard the block with __ASSEMBLER__, as settings.h already does for the STM32MP13 header. No effect on any C translation unit.pull/11401/head
parent
1bbab98e90
commit
7c0f0d168a
|
|
@ -3122,6 +3122,10 @@
|
|||
#endif /*(WOLFSSL_APACHE_MYNEWT)*/
|
||||
|
||||
#ifdef WOLFSSL_ZEPHYR
|
||||
/* Assembly sources reach settings.h through libwolfssl_sources_asm.h and need
|
||||
* only the feature macros. The Zephyr headers below, and the z_realloc
|
||||
* prototype, are C - without this guard the assembler is handed <stdlib.h>. */
|
||||
#ifndef __ASSEMBLER__
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
@ -3194,6 +3198,7 @@
|
|||
#define CONFIG_NET_SOCKETS_POSIX_NAMES
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
#endif /* WOLFSSL_ZEPHYR */
|
||||
|
||||
#ifdef WOLFSSL_IMX6
|
||||
|
|
|
|||
Loading…
Reference in New Issue