Skip to content

Commit 6df6dec

Browse files
committed
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.
1 parent f18e336 commit 6df6dec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

features/netsocket/NetworkInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17+
#include "ns_list.h"
1718
#include "netsocket/NetworkInterface.h"
1819
#include "netsocket/NetworkStack.h"
1920
#include "platform/Callback.h"
2021
#include "platform/mbed_error.h"
2122
#include <string.h>
22-
#include "ns_list.h"
2323

2424
// Default network-interface state
2525
void NetworkInterface::set_as_default()

platform/SingletonPtr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ struct SingletonPtr {
131131

132132
// This is zero initialized when in global scope
133133
mutable void *_ptr;
134-
#if __cplusplus >= 201103L
135-
// Align data appropriately
134+
#if __cplusplus >= 201103L && !defined __CC_ARM
135+
// Align data appropriately (ARM Compiler 5 does not support alignas in C++11 mode)
136136
alignas(T) mutable char _data[sizeof(T)];
137137
#else
138138
// Force data to be 8 byte aligned

0 commit comments

Comments
 (0)