JeffersonLab / qphix

QCD for Intel Xeon Phi and Xeon processors
http://jeffersonlab.github.io/qphix/
Other
14 stars 11 forks source link

take into account sysctl deprecation in modern linux kernels #122

Open kostrzewa opened 1 year ago

kostrzewa commented 1 year ago

As described in https://www.phoronix.com/news/Linux-5.5-Kills-SYSCTL-SYSCALL, sys/sysctl.h has been deprecated for a while, as a result of which QPhiX and/or applications using it fail to build on some systems (such as on github's CI runners).

This seems to fix the issue in the sense that it requires sysconf to be available if sysctl is not. I'm not actually sure that either sys/types.h or sys/sysctl.h are required for using __rdtsc but I don't know so I wanted to make a minimal change which preserves the status quo of sys/sysctl.h is available.

Note that for testing reasons I had to include #121 in here as well.