Re: [chrony-dev] [Git][chrony/chrony][master] 7 commits: doc: improve description of logbanner

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Thu, May 01, 2025 at 09:36:28AM +1200, Bryan Christianson wrote:
> macOS does not declare SOCK_CLOEXEC and SOCK_NONBLOCK. I think the following patch will correct the warning.
> 
> diff --git a/socket.c b/socket.c
> index d08b865..c5d15a7 100644
> --- a/socket.c
> +++ b/socket.c
> @@ -44,6 +44,11 @@
>  #include "ptp.h"
>  #include "util.h"
>   +#ifdef MACOSX
> +#define SOCK_CLOEXEC FD_CLOEXEC
> +#define SOCK_NONBLOCK O_NONBLOCK
> +#endif
> +

That might fix the compilation, but I don't think it's right to pass
an open() or ioctl() flag to socket().

I disabled the function when not used.

Thanks for the report.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/