summaryrefslogtreecommitdiff
path: root/cb/elogind.cbp
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-10-16 19:57:45 +0200
committerMark Hindley <mark@hindley.org.uk>2018-10-30 16:37:42 +0000
commit94b8b3d652660e997db0202a182809b78b051a01 (patch)
treef5f88f45ac43005ed68c7fcc6d8298c2f8530bef /cb/elogind.cbp
parent93998e41af60d5007375a21e37eb106104fbe28a (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 />