aboutsummaryrefslogtreecommitdiff
path: root/src/util/program.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/program.c')
-rw-r--r--src/util/program.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util/program.c b/src/util/program.c
index 8a5b1c414..1462a03a8 100644
--- a/src/util/program.c
+++ b/src/util/program.c
@@ -161,12 +161,13 @@ GNUNET_PROGRAM_run2 (int argc,
161 unsigned long long skew_variance; 161 unsigned long long skew_variance;
162 long long clock_offset; 162 long long clock_offset;
163 struct GNUNET_CONFIGURATION_Handle *cfg; 163 struct GNUNET_CONFIGURATION_Handle *cfg;
164 const struct GNUNET_OS_ProjectData *pd = GNUNET_OS_project_data_get ();
164 struct GNUNET_GETOPT_CommandLineOption defoptions[] = 165 struct GNUNET_GETOPT_CommandLineOption defoptions[] =
165 {GNUNET_GETOPT_option_cfgfile (&cc.cfgfile), 166 {GNUNET_GETOPT_option_cfgfile (&cc.cfgfile),
166 GNUNET_GETOPT_option_help (binaryHelp), 167 GNUNET_GETOPT_option_help (binaryHelp),
167 GNUNET_GETOPT_option_loglevel (&loglev), 168 GNUNET_GETOPT_option_loglevel (&loglev),
168 GNUNET_GETOPT_option_logfile (&logfile), 169 GNUNET_GETOPT_option_logfile (&logfile),
169 GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION)}; 170 GNUNET_GETOPT_option_version (pd->version)};
170 struct GNUNET_GETOPT_CommandLineOption *allopts; 171 struct GNUNET_GETOPT_CommandLineOption *allopts;
171 const char *gargs; 172 const char *gargs;
172 char *lpfx; 173 char *lpfx;
@@ -231,9 +232,9 @@ GNUNET_PROGRAM_run2 (int argc,
231 "%s%s%s", 232 "%s%s%s",
232 xdg, 233 xdg,
233 DIR_SEPARATOR_STR, 234 DIR_SEPARATOR_STR,
234 GNUNET_OS_project_data_get ()->config_file); 235 pd->config_file);
235 else 236 else
236 cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file); 237 cfg_fn = GNUNET_strdup (pd->user_config_file);
237 lpfx = GNUNET_strdup (binaryName); 238 lpfx = GNUNET_strdup (binaryName);
238 if (NULL != (spc = strstr (lpfx, " "))) 239 if (NULL != (spc = strstr (lpfx, " ")))
239 *spc = '\0'; 240 *spc = '\0';