git: fc75da3a3b2a - main - graphics/libjxl: fix build on powerpc64*
Jan Beich
jbeich at FreeBSD.org
Thu Sep 30 19:23:10 UTC 2021
Piotr Kubaj <pkubaj at 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
More information about the dev-commits-ports-all
mailing list