tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/58663: gpt(1) biosboot.c doesn't compile on modern Linux
On Wed, Sep 04, 2024 at 16:25:19 +1200, Lloyd Parkes wrote:
> The problem is that daddr_t and off_t are 32 bits and 64 bits in size
> respectively on Linux and then pointers get screwy.
>
> diff -r 3a2c38eb3772 sbin/gpt/biosboot.c
> --- a/sbin/gpt/biosboot.c Tue Sep 03 19:51:02 2024 +0000
> +++ b/sbin/gpt/biosboot.c Wed Sep 04 15:08:01 2024 +1200
> @@ -267,7 +267,7 @@
> #endif
> int ch;
> gpt_t ngpt = gpt;
> - daddr_t start = 0;
> + off_t start = 0; /* off_t because of gpt_human_get() */
> uint64_t size = 0;
> int active = 0;
> unsigned int entry = 0;
The comment is not necessary (cf. bunch of other places that call
gpt_human_get). Otherwise LGTM.
-uwe
Home |
Main Index |
Thread Index |
Old Index