From: Kefu Chai Date: Tue, 28 Aug 2018 07:37:21 +0000 (+0800) Subject: auth: instantiate the templates if WITH_SEASTAR X-Git-Tag: v14.0.1~345^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9b26bdaa53920ee1ddb9651f9b1707b7cd404c90;p=ceph.git auth: instantiate the templates if WITH_SEASTAR specialize class/method of LockPolicy::SINGLE `#ifdef WITH_SEASTAR`. in long term, probably we can remove `LockPolicy`, as WITH_SEASTAR implies `LockPolicy::SINGLE`. Signed-off-by: Kefu Chai --- diff --git a/src/auth/AuthClientHandler.cc b/src/auth/AuthClientHandler.cc index 1ac96a50c4f60..fe0a5238f5495 100644 --- a/src/auth/AuthClientHandler.cc +++ b/src/auth/AuthClientHandler.cc @@ -36,8 +36,16 @@ AuthClientHandler::create(CephContext *cct, int proto, } // explicitly instantiate only the classes we need +#ifdef WITH_SEASTAR +template AuthClientHandler* +AuthClientHandler::create( + CephContext *cct, + int proto, + RotatingKeyRing *rkeys); +#else template AuthClientHandler* AuthClientHandler::create( CephContext *cct, int proto, RotatingKeyRing *rkeys); +#endif diff --git a/src/auth/RotatingKeyRing.cc b/src/auth/RotatingKeyRing.cc index 196b1a1205218..6fade65c8a01d 100644 --- a/src/auth/RotatingKeyRing.cc +++ b/src/auth/RotatingKeyRing.cc @@ -79,4 +79,8 @@ KeyRing *RotatingKeyRing::get_keyring() } // explicitly instantiate only the classes we need +#ifdef WITH_SEASTAR +template class RotatingKeyRing; +#else template class RotatingKeyRing; +#endif diff --git a/src/auth/cephx/CephxClientHandler.cc b/src/auth/cephx/CephxClientHandler.cc index 73e4c7e16d9fa..3559fd7372866 100644 --- a/src/auth/cephx/CephxClientHandler.cc +++ b/src/auth/cephx/CephxClientHandler.cc @@ -252,4 +252,8 @@ bool CephxClientHandler::need_tickets() } // explicitly instantiate only the classes we need +#ifdef WITH_SEASTAR +template class CephxClientHandler; +#else template class CephxClientHandler; +#endif