Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Can't cross-build on macOS: clock.h



On Fri, 27 Oct 2023 08:03:48 +0200
Adam <adam%netbsd.org@localhost> wrote:

> Greetings,
> 
> This change:
> 
> --- clock.h 26 Oct 2023 00:59:16 -0000 1.5
> +++ clock.h 26 Oct 2023 14:04:45 -0000 1.6
> @@ -1,4 +1,4 @@
> -/* $NetBSD: clock.h,v 1.5 2023/10/26 00:59:16 jschauma Exp $ */
> +/* $NetBSD: clock.h,v 1.6 2023/10/26 14:04:45 jschauma Exp $ */
>    /*-
>   * Copyright (c) 1996 The NetBSD Foundation, Inc.
> @@ -32,9 +32,7 @@
>  #ifndef _SYS_CLOCK_H_
>  #define _SYS_CLOCK_H_
>   -#if !defined(_KERNEL) && !defined(_STANDALONE)
> -#include <stdint.h>
> -#endif
> +#include <sys/stdint.h>
>    /* Some handy constants. */
>  #define SECS_PER_MINUTE 60
> 
> 
> breaks building current on macOS, because stdint.h is in usr/include, and not in usr/include/sys.
> 
> 
> dependall ===> tools/makefs
> In file included from /dist/src/sys/dev/clock_subr.c:64:
> /dist/src/sys/dev/../sys/clock.h:35:10: fatal error: 'sys/stdint.h' file not found
> #include <sys/stdint.h>
>          ^~~~~~~~~~~~~~
> 1 error generated.
> 
> 
> I don't know how to fix this properly. Probably #if defined(__NetBSD__). Please, advise.

The header being used from the tools build was an unexpected surprise
but such reasons are why those ifdef guards exist. So I think it
just just be put back the way it was. The example came from
sys/atomic.h so it shouldn't be controversial.


Home | Main Index | Thread Index | Old Index