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

List:       busybox
Subject:    Re: [PATCH] libbb: mark scripted_main() as externally visible
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2019-03-30 15:49:02
Message-ID: CAK1hOcN0nVjoGkywVesPg-PAO5+9VsO1gDnryTt5kjkdpAKBtQ () mail ! gmail ! com
[Download RAW message or body]

Applied, thanks!

On Sat, Mar 30, 2019 at 8:47 AM Ron Yorston <rmy@pobox.com> wrote:
>
> Building with individual binaries enabled fails when embedded
> script applets are included:
>
>    /tmp/ccIvMFZg.o: In function `main':
>    applet.c:(.text.main+0x20): undefined reference to `scripted_main'
>
> Mark scripted_main() as externally visible.
>
> Reported-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Signed-off-by: Ron Yorston <rmy@pobox.com>
> ---
>  include/libbb.h   | 2 +-
>  libbb/appletlib.c | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/libbb.h b/include/libbb.h
> index e0d5521e4..a20d5e403 100644
> --- a/include/libbb.h
> +++ b/include/libbb.h
> @@ -1347,7 +1347,7 @@ void bb_logenv_override(void) FAST_FUNC;
>
>  /* Embedded script support */
>  char *get_script_content(unsigned n) FAST_FUNC;
> -int scripted_main(int argc, char** argv);
> +int scripted_main(int argc, char** argv) MAIN_EXTERNALLY_VISIBLE;
>
>  /* Applets which are useful from another applets */
>  int bb_cat(char** argv) FAST_FUNC;
> diff --git a/libbb/appletlib.c b/libbb/appletlib.c
> index c15014a34..fa19e8488 100644
> --- a/libbb/appletlib.c
> +++ b/libbb/appletlib.c
> @@ -770,6 +770,7 @@ static int find_script_by_name(const char *name)
>         return -1;
>  }
>
> +int scripted_main(int argc UNUSED_PARAM, char **argv) MAIN_EXTERNALLY_VISIBLE;
>  int scripted_main(int argc UNUSED_PARAM, char **argv)
>  {
>         int script = find_script_by_name(applet_name);
> --
> 2.20.1
>
> _______________________________________________
> 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