Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Sep 2021 21:23:06 +0200
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Piotr Kubaj <pkubaj@FreeBSD.org>
Cc:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   Re: git: fc75da3a3b2a - main - graphics/libjxl: fix build on powerpc64*
Message-ID:  <h7e1-98bp-wny@FreeBSD.org>
In-Reply-To: <202109301550.18UFoo8j096475__2724.79643333412$1633017067$gmane$org@gitrepo.freebsd.org> (Piotr Kubaj's message of "Thu, 30 Sep 2021 15:50:50 GMT")
References:  <202109301550.18UFoo8j096475__2724.79643333412$1633017067$gmane$org@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Piotr Kubaj <pkubaj@FreeBSD.org> writes:

> ++#elif __FreeBSD__
> ++  static double cycles_per_second = 0;

"static" is useless if sysctlbyname() is run unconditionally.
Consider adding "if (!cycles_per_second) {" here.

See also https://github.com/abseil/abseil-cpp/commit/0033c9ea91a5
I don't think you need a lamda expression like that. ;)

> ++  size_t length = sizeof(cycles_per_second);
> ++  sysctlbyname("kern.timecounter.tc.timebase.frequency", &cycles_per_second,
> ++               &length, NULL, 0);
> ++#endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?h7e1-98bp-wny>