Skip to content

Commit b38ec50

Browse files
authored
Fix __attribute__ (#9)
* Test Signed-off-by: Pablo Garrido <[email protected]> * Revert "Test" This reverts commit 02112c6. * Update Signed-off-by: Pablo Garrido <[email protected]>
1 parent fad6902 commit b38ec50

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

platform_code/micro_ros_platformio.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22
#ifndef MICRO_ROS_PLATFORMIO
33
#define MICRO_ROS_PLATFORMIO
44

5+
#include <uxr/client/transport.h>
6+
7+
// In GNU C < 6.0.0 __attribute__((deprecated(msg))) is not supported for enums, used in rmw/types.h
8+
#if __GNUC__ < 6
9+
#define aux__attribute__(x) __attribute__(x)
510
#define __attribute__(x)
11+
#endif
612

7-
#include <uxr/client/transport.h>
813
#include <rmw_microros/rmw_microros.h>
914

15+
#if __GNUC__ < 6
16+
#undef __attribute__
17+
#define __attribute__(x) aux__attribute__(x)
18+
#endif
19+
1020
#ifdef __cplusplus
1121
extern "C"
1222
{

0 commit comments

Comments
 (0)