]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: remove unnamed struct in qobj for C++
authorDavid Lamparter <equinox@opensourcerouting.org>
Mon, 11 Feb 2019 12:07:24 +0000 (13:07 +0100)
committerRenato Westphal <renato@opensourcerouting.org>
Mon, 11 Feb 2019 17:49:49 +0000 (15:49 -0200)
Signed-off-by: David Lamparter <equinox@diac24.net>
lib/qobj.h

index b701eeec5fadd221e9a7be7f80de45961911b473..a109bf4a734cce66aacf1a4229f0bb912513fc45 100644 (file)
  * 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.