diff mbox series

shadow: Fix build failure on Ubuntu-20.04

Message ID 20240208193136.2746829-1-uvv.mail@gmail.com
State Rejected, archived
Headers show
Series shadow: Fix build failure on Ubuntu-20.04 | expand

Commit Message

Vyacheslav Yurkov Feb. 8, 2024, 7:31 p.m. UTC
Don't use systemd features for native build, otherwise it failes with
following error:

../../shadow-4.14.2/lib/logind.c: In function ‘active_sessions_count’:
../../shadow-4.14.2/lib/logind.c:38:55: error: parameter name omitted
   38 | unsigned long active_sessions_count(const char *name, unsigned long unused)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
---
 meta/recipes-extended/shadow/shadow.inc | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Alexander Kanavin Feb. 8, 2024, 7:38 p.m. UTC | #1
This isn’t correct as the option still checks for  systemd when enabled and
disables itself if that is not found. My patch is better.

Alex

On Thu 8. Feb 2024 at 20.32, Vyacheslav Yurkov <uvv.mail@gmail.com> wrote:

> Don't use systemd features for native build, otherwise it failes with
> following error:
>
> ../../shadow-4.14.2/lib/logind.c: In function ‘active_sessions_count’:
> ../../shadow-4.14.2/lib/logind.c:38:55: error: parameter name omitted
>    38 | unsigned long active_sessions_count(const char *name, unsigned
> long unused)
>
> Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
> ---
>  meta/recipes-extended/shadow/shadow.inc | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/meta/recipes-extended/shadow/shadow.inc
> b/meta/recipes-extended/shadow/shadow.inc
> index b8e5e285c4..5029ac4ca4 100644
> --- a/meta/recipes-extended/shadow/shadow.inc
> +++ b/meta/recipes-extended/shadow/shadow.inc
> @@ -43,6 +43,7 @@ EXTRA_OECONF += "--without-libcrack \
>                   --with-group-name-max-length=24 \
>                   --enable-subordinate-ids=yes \
>                   --without-sssd \
> +                 ${LOGINDOPT} \
>                   ${NSCDOPT}"
>
>  CFLAGS:append:libc-musl = " -DLIBBSD_OVERLAY"
> @@ -52,6 +53,11 @@ NSCDOPT:class-native = "--without-nscd"
>  NSCDOPT:class-nativesdk = "--without-nscd"
>  NSCDOPT:libc-glibc = "--with-nscd"
>
> +LOGINDOPT = ""
> +LOGINDOPT:class-native = "--disable-logind"
> +LOGINDOPT:class-nativesdk = "--disable-logind"
> +LOGINDOPT:libc-glibc = "--enable-logind"
> +
>  PAM_PLUGINS = "libpam-runtime \
>                 pam-plugin-faildelay \
>                 pam-plugin-securetty \
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#195175):
> https://lists.openembedded.org/g/openembedded-core/message/195175
> Mute This Topic: https://lists.openembedded.org/mt/104245489/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index b8e5e285c4..5029ac4ca4 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -43,6 +43,7 @@  EXTRA_OECONF += "--without-libcrack \
                  --with-group-name-max-length=24 \
                  --enable-subordinate-ids=yes \
                  --without-sssd \
+                 ${LOGINDOPT} \
                  ${NSCDOPT}"
 
 CFLAGS:append:libc-musl = " -DLIBBSD_OVERLAY"
@@ -52,6 +53,11 @@  NSCDOPT:class-native = "--without-nscd"
 NSCDOPT:class-nativesdk = "--without-nscd"
 NSCDOPT:libc-glibc = "--with-nscd"
 
+LOGINDOPT = ""
+LOGINDOPT:class-native = "--disable-logind"
+LOGINDOPT:class-nativesdk = "--disable-logind"
+LOGINDOPT:libc-glibc = "--enable-logind"
+
 PAM_PLUGINS = "libpam-runtime \
                pam-plugin-faildelay \
                pam-plugin-securetty \