mirror of https://github.com/ARMmbed/mbed-os.git
Fix ARMC5 compilation
Minor tweaks to fix ARM C 5 compatibility. Pushing "ns_list.h" include to first makes sure "ns_types.h" is included first, meaning it gets to define `__STDC_LIMIT_MACROS` before the first include of <stdint.h>, which ensures that UINT8_MAX etc are defined.pull/10805/head
parent
f18e3364e9
commit
6df6decdfc
|
@ -14,12 +14,12 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "ns_list.h"
|
||||||
#include "netsocket/NetworkInterface.h"
|
#include "netsocket/NetworkInterface.h"
|
||||||
#include "netsocket/NetworkStack.h"
|
#include "netsocket/NetworkStack.h"
|
||||||
#include "platform/Callback.h"
|
#include "platform/Callback.h"
|
||||||
#include "platform/mbed_error.h"
|
#include "platform/mbed_error.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "ns_list.h"
|
|
||||||
|
|
||||||
// Default network-interface state
|
// Default network-interface state
|
||||||
void NetworkInterface::set_as_default()
|
void NetworkInterface::set_as_default()
|
||||||
|
|
|
@ -131,8 +131,8 @@ struct SingletonPtr {
|
||||||
|
|
||||||
// This is zero initialized when in global scope
|
// This is zero initialized when in global scope
|
||||||
mutable void *_ptr;
|
mutable void *_ptr;
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L && !defined __CC_ARM
|
||||||
// Align data appropriately
|
// Align data appropriately (ARM Compiler 5 does not support alignas in C++11 mode)
|
||||||
alignas(T) mutable char _data[sizeof(T)];
|
alignas(T) mutable char _data[sizeof(T)];
|
||||||
#else
|
#else
|
||||||
// Force data to be 8 byte aligned
|
// Force data to be 8 byte aligned
|
||||||
|
|
Loading…
Reference in New Issue