hey all,<br><br>I'm trying to build my own broker using C++ language ( g++-4.7.real (Debian 4.7.1-2) 4.7.1, nagios 3.4.1 ).<br><br>Something goes wrong when g++ compiles the commandsmember structure in objects.h :<br><br>
/* COMMANDSMEMBER structure */<br>typedef struct commandsmember_struct {<br> char *command;<br>#ifdef NSCORE<br> command *command_ptr;<br>#endif<br> struct commandsmember_struct *next;<br> } commandsmember;<br><br>../include/objects.h:180:2: error: ‘command’ does not name a type. I think it is C++'s rule C++11 3.3.10/1:<br>
<br>"A name can be hidden by an explicit declaration of that same name in a nested declarative region or derived class."<br><br>So I came with that patch which seems to be the best way to get both gcc and g++ happy.<br>
<br>--- <a href="http://objects.h.org">objects.h.org</a> 2012-08-12 17:46:35.000000000 +0200<br>+++ objects.h 2012-08-12 18:00:24.000000000 +0200<br>@@ -177,7 +177,7 @@<br> typedef struct commandsmember_struct {<br> char *command;<br>
#ifdef NSCORE<br>- command *command_ptr;<br>+ struct command_ptr *command_ptr;<br> #endif<br> struct commandsmember_struct *next;<br> } commandsmember;<br><br>jfr