aboutsummaryrefslogtreecommitdiff
path: root/src/util/os_installation.c
diff options
context:
space:
mode:
authorAlessio Vanni <vannilla@firemail.cc>2020-10-10 17:19:53 +0200
committerChristian Grothoff <christian@grothoff.org>2020-10-11 10:30:46 +0200
commit77339944c9605919a035744df1a839a6e5793a37 (patch)
tree39314fcbb31f3aa6b3c2050a40bcfa151f717873 /src/util/os_installation.c
parent03199f7f246e1d636c9feb921d66be48c907130f (diff)
downloadgnunet-77339944c9605919a035744df1a839a6e5793a37.tar.gz
gnunet-77339944c9605919a035744df1a839a6e5793a37.zip
Allow applications to change ProjectData with only some fields
Some simple applications (e.g. thin clients) might want to change the ProjectData structure (e.g. for gettext), but might not meet all the requirements needed to fill it out completely. A thin client might not provide any library, making the `libname' field useless. More importantly, not every application requires a configuration: some of them, especially clients, might simply use command line options to drive their behaviour.
Diffstat (limited to 'src/util/os_installation.c')
-rw-r--r--src/util/os_installation.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/os_installation.c b/src/util/os_installation.c
index 34b88d761..1f2dd2e5b 100644
--- a/src/util/os_installation.c
+++ b/src/util/os_installation.c
@@ -150,6 +150,8 @@ get_path_from_proc_maps ()
150 FILE *f; 150 FILE *f;
151 char *lgu; 151 char *lgu;
152 152
153 if (NULL == current_pd->libname)
154 return NULL;
153 GNUNET_snprintf (fn, sizeof(fn), "/proc/%u/maps", getpid ()); 155 GNUNET_snprintf (fn, sizeof(fn), "/proc/%u/maps", getpid ());
154 if (NULL == (f = fopen (fn, "r"))) 156 if (NULL == (f = fopen (fn, "r")))
155 return NULL; 157 return NULL;