git: 086feed850c3 - main - md5: Create md5sum, etc compatible programs

Jessica Clarke jrtc27 at freebsd.org
Wed May 19 18:32:05 UTC 2021


On 19 May 2021, at 18:44, Warner Losh <imp at FreeBSD.org> wrote:
> 
> The branch main has been updated by imp:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=086feed850c31c278f25c958b97992d024139896
> 
> commit 086feed850c31c278f25c958b97992d024139896
> Author:     Warner Losh <imp at FreeBSD.org>
> AuthorDate: 2021-05-19 17:26:20 +0000
> Commit:     Warner Losh <imp at FreeBSD.org>
> CommitDate: 2021-05-19 17:41:53 +0000
> 
>    md5: Create md5sum, etc compatible programs
> 
>    On Linux, there's a similar set of programs to ours, but that end in the
>    letters 'sum'. These act basically like FreeBSD versions run with the -r
>    option. Add code so that when the program ends in 'sum' you get the
>    linux -r behavior. This is enough to make most things that use sha*sum
>    work correctly (the -c / --check options, as well as the long args are
>    not implemented). When running with the -sum programs, ignore -t instead
>    of running internal speed tests and make -c an error.
> 
>    Reviewed by:            sef, and kp and allanjude (earlier version)
>    Relnotes:               yes
>    Sponsored by:           Netflix
>    Differential Revision:  https://reviews.freebsd.org/D30309
> ---
> diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c
> index 96dfcede9711..4381ef124c7b 100644
> --- a/sbin/md5/md5.c
> +++ b/sbin/md5/md5.c
> @@ -177,13 +177,32 @@ main(int argc, char *argv[])
> 	char	buf[HEX_DIGEST_LENGTH];
> 	size_t	len;
>  	unsigned	digest;
> - 	const char*	progname;
> +	char	*progname;
> +	bool	gnu_emu = false;

This file doesn’t currently include stdbool.h explicitly, and apparently that
is not implicitly included by any of the headers on Linux (and I cannot work
out where it comes from on FreeBSD). Could you please add the explicit include
to fix cross-building?

Thanks,
Jess



More information about the dev-commits-src-main mailing list