File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/hal/drivers/mesa-hostmot2 Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 140140// IDROM and MD structs
141141//
142142
143+ // Need clang 21+ for the nonstring attribute
144+ #if !defined(__clang__ ) || (defined(__clang_major__ ) && __clang_major__ >= 21 )
145+ #define HM2_ATTRIBUTE_NONSTRING __attribute__((nonstring))
146+ #else
147+ #define HM2_ATTRIBUTE_NONSTRING
148+ #endif
143149
144150typedef struct {
145151 rtapi_u32 idrom_type ;
146152 rtapi_u32 offset_to_modules ;
147153 rtapi_u32 offset_to_pin_desc ;
148- rtapi_u8 board_name [8 ] __attribute__ (( nonstring )) ; // ASCII string, but not NULL terminated!
154+ rtapi_u8 board_name [8 ] HM2_ATTRIBUTE_NONSTRING ; // ASCII string, but not NULL terminated!
149155 rtapi_u32 fpga_size ;
150156 rtapi_u32 fpga_pins ;
151157 rtapi_u32 io_ports ;
Original file line number Diff line number Diff line change 2626#include "llio_info.h"
2727
2828typedef struct __info_entry_t {
29- char board_name [8 ] __attribute__ (( nonstring )) ;
29+ char board_name [8 ] HM2_ATTRIBUTE_NONSTRING ;
3030 const char * base_name ;
3131 int num_ioport_connectors ;
3232 int pins_per_connector ;
You can’t perform that action at this time.
0 commit comments