Skip to content

[LWIP] - Wrong header inclusion #2993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pan- opened this issue Oct 12, 2016 · 5 comments
Closed

[LWIP] - Wrong header inclusion #2993

pan- opened this issue Oct 12, 2016 · 5 comments

Comments

@pan-
Copy link
Member

pan- commented Oct 12, 2016

Description

  • Type: Bug |

The file emav_lwip.c include the header platform.h which includes C++ standard headers. Therefore, the compilation fail on GCC because standard C++ headers are not accessible from C files.

This bug can be hidden by the duplicate platform.h in the code base, depending on the project, the compiler can pick the one in mbedtls or the one in platform.


Bug

Target
K64F

Toolchain:
GCC_ARM

Toolchain version:
4.9.3

mbed-cli version:
0.9.5

meed-os sha:
a551faa

@pan-
Copy link
Member Author

pan- commented Oct 12, 2016

@0xc0170 What could we do about this ? This might cause compilation errors for every projects using lwip.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 12, 2016

The emac file referenced above should use config file to get device macros (used to be device.h).

I'll have a look and send a propose a fix.

@pan-
Copy link
Member Author

pan- commented Oct 12, 2016

what about the duplication of platform.h ?
Should I open an issue for this and if so, is it and mbed tls issue ?

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 12, 2016

Should I open an issue for this and if so, is it and mbed tls issue ?

Yes, lets create a separate issue. Is not already in the issue tracker - having duplicated header files in the code base ?

0xc0170 added a commit to 0xc0170/mbed-os that referenced this issue Oct 13, 2016
DEVICE_ are passed as command line -D, thus no inclusion is required.
``platform.h`` is C++ header file, should not be pulled in C files
sg- added a commit that referenced this issue Oct 13, 2016
@MarceloSalazar
Copy link

Fixed in #2994

c1728p9 pushed a commit that referenced this issue Oct 14, 2016
DEVICE_ are passed as command line -D, thus no inclusion is required.
``platform.h`` is C++ header file, should not be pulled in C files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants