Issue with objects.h
Jean-François Rameau
jf.rameau at gmail.com
Mon Sep 17 13:18:18 CEST 2012
hey all,
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 ).
Something goes wrong when g++ compiles the commandsmember structure in
objects.h :
/* COMMANDSMEMBER structure */
typedef struct commandsmember_struct {
char *command;
#ifdef NSCORE
command *command_ptr;
#endif
struct commandsmember_struct *next;
} commandsmember;
../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:
"A name can be hidden by an explicit declaration of that same name in a
nested declarative region or derived class."
So I came with that patch which seems to be the best way to get both gcc
and g++ happy.
--- objects.h.org 2012-08-12 17:46:35.000000000 +0200
+++ objects.h 2012-08-12 18:00:24.000000000 +0200
@@ -177,7 +177,7 @@
typedef struct commandsmember_struct {
char *command;
#ifdef NSCORE
- command *command_ptr;
+ struct command_ptr *command_ptr;
#endif
struct commandsmember_struct *next;
} commandsmember;
jfr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20120917/9b065e0b/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list