From: David Lamparter Date: Mon, 11 Feb 2019 12:07:24 +0000 (+0100) Subject: lib: remove unnamed struct in qobj for C++ X-Git-Tag: 7.1_pulled~248^2~5 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f8cd615bc4324386d173ad3615ab23b58da34752;p=matthieu%2Ffrr.git lib: remove unnamed struct in qobj for C++ Signed-off-by: David Lamparter --- diff --git a/lib/qobj.h b/lib/qobj.h index b701eeec5f..a109bf4a73 100644 --- a/lib/qobj.h +++ b/lib/qobj.h @@ -28,11 +28,17 @@ * this is intentional to prevent the struct from growing beyond the allocated * space. */ +#ifndef __cplusplus #define RESERVED_SPACE_STRUCT(name, fieldname, size) \ struct { \ struct name fieldname; \ char padding##fieldname[size - sizeof(struct name)]; \ }; +#else +#define RESERVED_SPACE_STRUCT(name, fieldname, size) \ + struct name fieldname; \ + char padding##fieldname[size - sizeof(struct name)]; +#endif /* don't need struct definitions for these here. code actually using * these needs to define the struct *before* including this header.