cpu/esp32: fix C linkage compilation error [backport 2020.01] #13144
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #13141
Contribution description
This PR fixes a C linkage compilation error with the new version of the ESP32 toolchain in RIOT-OS/riotdocker#97. The C linkage compilation error happens for example for
examples/posix_socket
and all applications that useesp_wifi
oresp_now
.The reason for the C linking error was that
drivers/include/mtd.h
was included inboards/esp32/board_common.h
within theexternal C
block. This causedatomic_base.h
to be included inside theexternal C
block, which in turn caused the C linking error for the template definitions in that file, for example:Testing procedure
Compilation in Murdock should succeed with current ESP32 toolchain.
Issues/PRs references
Prerequisite for RIOT-OS/riotdocker#97
Part of the fix of issue #13133