[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] Fix compiling with musl's utmp stubs
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2016-02-01 0:40:40
Message-ID: CAK1hOcNG3+BQ70Z0Jbk=A-JpS9xBOd3Ekve2Z8VUK6rrfu2q6A () mail ! gmail ! com
[Download RAW message or body]

Applied, thanks!

On Sun, Jan 31, 2016 at 7:02 AM, Kylie McClain <somasissounds@gmail.com> wrote:
> From 4d76d9b69503b1ad61cf857d83cb8c4d5d92465b Mon Sep 17 00:00:00 2001
> From: Kylie McClain <somasis@exherbo.org>
> Date: Sat, 30 Jan 2016 23:00:18 -0500
> Subject: [PATCH] Fix compiling with musl's utmp stubs
>
> This patch fixes compiling busybox with FEATURE_UTMP and _WTMP enabled.
> musl, while not really support utmp/wtmp, provides stub functions, as well
> as variables such as _PATH_UTMP, so that programs using utmp or wtmp can
> still compile fine.
>
> My reasoning for this patch is that on Exherbo, I'm currently trying to get
> us to be able to use the same busybox config file for both glibc and musl
> systems, using utmp/wtmp on systems that support it, and using the stubs
> on musl without needing two different configs.
>
> As of latest musl git, it provides all utmp functions needed; 1.1.12 doesn't,
> but I sent a patch to Rich to add the utmp{,x}name functions expected to
> exist, which was merged into musl upstream.
> ---
>  include/libbb.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/include/libbb.h b/include/libbb.h
> index a8ceb44..c1516a9 100644
> --- a/include/libbb.h
> +++ b/include/libbb.h
> @@ -20,6 +20,7 @@
>  #include <netdb.h>
>  #include <setjmp.h>
>  #include <signal.h>
> +#include <paths.h>
>  #if defined __UCLIBC__ /* TODO: and glibc? */
>  /* use inlined versions of these: */
>  # define sigfillset(s)    __sigfillset(s)
> @@ -106,7 +107,11 @@
>  #  define updwtmpx updwtmp
>  #  define _PATH_UTMPX _PATH_UTMP
>  # else
> +#  include <utmp.h>
>  #  include <utmpx.h>
> +#  if defined _PATH_UTMP && !defined _PATH_UTMPX
> +#   define _PATH_UTMPX _PATH_UTMP
> +#  endif
>  # endif
>  #endif
>  #if ENABLE_LOCALE_SUPPORT
> --
> 2.7.0
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic