diff options
author | Sam James <sam@gentoo.org> | 2022-07-05 01:47:35 +0100 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2022-09-07 18:48:46 +0000 |
commit | 95f946e314f1fcf8c4ccd4f3627fa0787d4344ef (patch) | |
tree | 692c119b3585a1149af2867a4a5cd5908c8f185f /meson.build | |
parent | 1ac16535048cfe20fbab66b3c64ad9a9b435b143 (diff) | |
download | gdm-95f946e314f1fcf8c4ccd4f3627fa0787d4344ef.tar.gz |
meson: set -D_GNU_SOURCE for updwtmpx
Without setting GNU_SOURCE, we end up getting:
```
../gdm-42.0/daemon/gdm-session-record.c:200:9: error: implicit declaration of function ‘updwtmpx’; did you mean ‘updwtmp’? [-Werror=implicit-function-declaration]
updwtmpx (GDM_NEW_SESSION_RECORDS_FILE, &session_record);
```
This ended up exposing a bug in updwtmp(3) (which is now fixed
thanks to the man-pages maintainers!) as it didn't mention that updwtmpx
is a GNU extension (and hence needs GNU_SOURCE in order to be available).
Alternatively, we could just #define _GNU_SOURCE in gdm-session-record.c
for updwtmpx.
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=216168
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 845f673e..2c4f0060 100644 --- a/meson.build +++ b/meson.build @@ -12,6 +12,9 @@ i18n = import('i18n') # Compiler cc = meson.get_compiler('c') +# Use GNU extensions if available +add_project_arguments('-D_GNU_SOURCE', language: 'c') + # Options gdm_prefix = get_option('prefix') |