Date: Sat, 24 Jan 2015 02:00:09 +0000 From: Marcin Cieslak <saper@saper.info> To: freebsd-hackers@FreeBSD.org, pjd@FreeBSD.org Subject: Do I need <geom/geom.h> in <geom/gate/g_gate.h> ? Message-ID: <alpine.BSF.2.11.1501240148560.91610@z.fncre.vasb>
next in thread | raw e-mail | index | archive | help
I am trying to write a GEOM gate module in C++ - for the project that is already written 100% in C++ .... Unfortunately, trying to #include <geom/gate/g_gate.h> fails: In file included from GEOMGate.cpp:1: In file included from /usr/include/geom/gate/g_gate.h:37: /usr/include/geom/geom.h:118:21: error: expected ';' after struct LIST_ENTRY(g_class) class; ^ /usr/include/geom/geom.h:118:22: error: declaration of anonymous class must be a definition LIST_ENTRY(g_class) class; ^ /usr/include/geom/geom.h:131:19: error: expected member name or ';' after declaration specifiers struct g_class *class; ~~~~~~ ^ /usr/include/geom/geom.h:186:10: error: expected member name or ';' after declaration specifiers void *private; ~~~~ ^ /usr/include/geom/geom.h:215:10: error: expected member name or ';' after declaration specifiers void *private; ~~~~ ^ I think C++ does not like using "class" in this context. One idea would be to get rid of this word in <geom/geom.h>; but I also noticed that including <geom/geom.h> in <geom/gate/g_gate.h> does not seem necessary at all (as this is the userland interface). At least our sample ggate userland programs compile fine without it, and ggate kernel module includes <geom/geom.h> separately. Would that be ok to remove seemingly unnecessary include directive? //Marcin [1] http://thread.gmane.org/gmane.os.freebsd.devel.hackers/52098
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1501240148560.91610>