summaryrefslogtreecommitdiff
path: root/cb/elogind.cbp
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-10-16 19:57:45 +0200
committerSven Eden <yamakuzure@gmx.net>2018-10-16 19:57:45 +0200
commit7f1e80bff4967f9a7b0d7ff79e02856ab94b6c1d (patch)
treef86e60b9f37f5b0bb255d0024dec951da96c6124 /cb/elogind.cbp
parente143b8013b96fca5d5ef4a73fe255daed3aa1ec3 (diff)
Prep v239: Fix an issue with program_invocation[_short]_name :
The old implementation was done assuming that only glibc provides both program_invocation_name and program_invocation_short_name. This worked well for users using musl-libc with the library having been built without -D_GNU_SOURCE. However, alternative libc implementations that actually do provide these variables, could cause elogind to crash. To be on the safe side, we now actually check whether both these variables are present by letting meson check whether a code snippet accessing these compiles and links.
Diffstat (limited to 'cb/elogind.cbp')
-rw-r--r--cb/elogind.cbp5
1 files changed, 5 insertions, 0 deletions
diff --git a/cb/elogind.cbp b/cb/elogind.cbp
index f612e9176..387e057e3 100644
--- a/cb/elogind.cbp
+++ b/cb/elogind.cbp
@@ -1118,6 +1118,11 @@
<Option target="all" />
<Option target="clean" />
</Unit>
+ <Unit filename="../tools/meson-build.sh" />
+ <Unit filename="../tools/meson-check-compilation.sh" />
+ <Unit filename="../tools/meson-link-test.c">
+ <Option compilerVar="CC" />
+ </Unit>
<Extensions>
<envvars />
<code_completion />