Skip to content

Commit 50bafc3

Browse files
robimarkojwcart2
authored andcommitted
policycoreutils: run_init: define _GNU_SOURCE
Trying to compile run_init with musl will fail with: run_init.c: In function 'authenticate_via_shadow_passwd': run_init.c:206:40: error: implicit declaration of function 'getpass' [-Wimplicit-function-declaration] 206 | if (!(unencrypted_password_s = getpass(PASSWORD_PROMPT))) { This is because getpass in musl is guarded only for _GNU_SOURCE, so define _GNU_SOURCE for run_init. Signed-off-by: Robert Marko <[email protected]> Acked-by: James Carter <[email protected]>
1 parent 4ec779f commit 50bafc3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

policycoreutils/run_init/run_init.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
*
3838
*************************************************************************/
3939

40+
#define _GNU_SOURCE
41+
4042
#include <stdio.h>
4143
#include <stdlib.h> /* for malloc(), realloc(), free() */
4244
#include <pwd.h> /* for getpwuid() */

0 commit comments

Comments
 (0)