From: Joel Rosdahl Date: Thu, 12 May 2022 18:21:08 +0000 (+0200) Subject: chore: Prepare for binary patching SYSCONFDIR X-Git-Tag: v4.6.1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9562711e0a26f64bba0166661ee0ab5be0112e65;p=thirdparty%2Fccache.git chore: Prepare for binary patching SYSCONFDIR --- diff --git a/src/Config.cpp b/src/Config.cpp index ea2c63233..ee4cd9f7f 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -53,6 +53,9 @@ using nonstd::optional; DLLIMPORT extern char** environ; #endif +// Make room for binary patching at install time. +const char k_sysconfdir[4096 + 1] = SYSCONFDIR; + namespace { enum class ConfigItem { @@ -489,7 +492,7 @@ Config::read() set_secondary_config_path(env_ccache_configpath2 ? env_ccache_configpath2 - : FMT("{}/ccache.conf", SYSCONFDIR)); + : FMT("{}/ccache.conf", k_sysconfdir)); MTR_BEGIN("config", "conf_read_secondary"); // A missing config file in SYSCONFDIR is OK so don't check return value. update_from_file(secondary_config_path());