aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2016-01-31 22:42:43 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2016-02-01 19:08:59 +0000
commite0f11780797f6ddee5bdfd965c7f499e8810c2b4 (patch)
treecfda3d7eb906bd54ebce1b29f4b38461d95fc76e
parentbd3f7da01b59236c94921c1eace23792436c0564 (diff)
downloadpaludis-e0f11780797f6ddee5bdfd965c7f499e8810c2b4.tar.gz
paludis-e0f11780797f6ddee5bdfd965c7f499e8810c2b4.tar.xz
Avoid PIC errors
ld: .libs/persona.o: relocation R_X86_64_PC32 against undefined symbol `_ZN12_GLOBAL__N_128SystemConfigurationParameterILj70EE8SpellingE' can not be used when making a shared object; recompile with -fPIC
-rw-r--r--paludis/util/persona.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/paludis/util/persona.cc b/paludis/util/persona.cc
index 3964356..5f051c1 100644
--- a/paludis/util/persona.cc
+++ b/paludis/util/persona.cc
@@ -29,17 +29,16 @@
namespace
{
template <unsigned Name>
- struct SystemConfigurationParameter;
+ struct SystemConfigurationParameter
+ {
+ static const char * const Spelling;
+ };
template <>
- struct SystemConfigurationParameter<_SC_GETPW_R_SIZE_MAX> {
- static constexpr const char * const Spelling = "_SC_GETPW_R_SIZE_MAX";
- };
+ const char * const SystemConfigurationParameter<_SC_GETPW_R_SIZE_MAX>::Spelling = "_SC_GETPW_R_SIZE_MAX";
template <>
- struct SystemConfigurationParameter<_SC_GETGR_R_SIZE_MAX> {
- static constexpr const char * const Spelling = "_SC_GETGR_R_SIZE_MAX";
- };
+ const char * const SystemConfigurationParameter<_SC_GETGR_R_SIZE_MAX>::Spelling = "_SC_GETGR_R_SIZE_MAX";
template <unsigned Name, size_t DefaultSize = 1024, long DodgyLimit = 1024 * 128>
size_t initial_buffer_size(const char *context)