From: Miroslav Lichvar Date: Wed, 21 Aug 2019 07:12:33 +0000 (+0200) Subject: ntp: update setting of socket option X-Git-Tag: 4.0-pre1~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58fc81441bb5363eb7399c0494588eaba2e1a4f1;p=thirdparty%2Fchrony.git ntp: update setting of socket option --- diff --git a/ntp_io_linux.c b/ntp_io_linux.c index 59b19ce6..6519791f 100644 --- a/ntp_io_linux.c +++ b/ntp_io_linux.c @@ -324,8 +324,7 @@ check_timestamping_option(int option) if (sock_fd < 0) return 0; - if (setsockopt(sock_fd, SOL_SOCKET, SO_TIMESTAMPING, &option, sizeof (option)) < 0) { - DEBUG_LOG("Could not enable timestamping option %x", (unsigned int)option); + if (!SCK_SetIntOption(sock_fd, SOL_SOCKET, SO_TIMESTAMPING, option)) { SCK_CloseSocket(sock_fd); return 0; }