From aff1b3436e862c86646759b2e3e27129ee5f3f7a Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 24 Jun 2022 11:15:13 -0700 Subject: [PATCH] ircd: Forward declare missing karma::rule; ensure visibility of public rules. --- include/ircd/grammar.h | 12 +++++++++++- include/ircd/rfc3986.h | 12 ++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/include/ircd/grammar.h b/include/ircd/grammar.h index 9acdd1ffb..ec306daee 100644 --- a/include/ircd/grammar.h +++ b/include/ircd/grammar.h @@ -30,5 +30,15 @@ namespace boost::spirit::qi class T2, class T3, class T4> - struct rule; + struct [[gnu::visibility("default")]] rule; +} + +namespace boost::spirit::karma +{ + template + struct [[gnu::visibility("default")]] rule; } diff --git a/include/ircd/rfc3986.h b/include/ircd/rfc3986.h index 2d2ba10ac..9d907eb6a 100644 --- a/include/ircd/rfc3986.h +++ b/include/ircd/rfc3986.h @@ -84,14 +84,18 @@ struct ircd::rfc3986::uri // which take a reference to any apropos rule. To avoid exposure of // boost::spirit in project headers these types are carefully crafted thin forward // declarations, so spirit itself is not included here. -#pragma GCC visibility push(default) namespace ircd::rfc3986::parser { using unused = boost::spirit::unused_type; - template - using rule = boost::spirit::qi::rule; + template + struct [[gnu::visibility("default")]] rule + :boost::spirit::qi::rule + { + using boost::spirit::qi::rule::rule; + }; + #pragma GCC visibility push(default) extern const rule<> sub_delims; extern const rule<> gen_delims; extern const rule<> reserved; @@ -149,8 +153,8 @@ namespace ircd::rfc3986::parser extern const rule<> absolute_uri; extern const rule<> uri; extern const rule<> uri_ref; // uri | relative_ref + #pragma GCC visibility pop } -#pragma GCC visibility pop // Validator suite namespace ircd::rfc3986