Hi! On Sun, 6 Jul 2025 21:50, Guido Trentalancia said:
> common: Disable CPU speculation-related misfeatures I would prefer to keep the subject clear of an opinion. > +#if defined(__linux__) > +# include <sys/prctl.h> > +#endif Good. You now provide configure tests. Please also add a general one which checks for this header. > +#if defined(__linux__) And use that here ;-) > AC_CHECK_HEADERS([unistd.h langinfo.h termio.h locale.h \ > pwd.h inttypes.h signal.h sys/select.h sys/time.h \ > stdint.h signal.h termios.h \ > - ucred.h sys/ucred.h sys/sysmacros.h sys/mkdev.h]) > + ucred.h sys/ucred.h sys/sysmacros.h sys/mkdev.h \ > + sys/prctl.h]) Hey, you already got that macro. Thus you can replace the above with #if defined(HAVE_SYS_PRCTL_H) && defined(__linux__) and we are good. The ifdef __linux__ here is so that we cater for OSes which have such a header for different purposes. Using the standard configure test along with a ifdef in the code is a good compromise between readibility and regualar autoconf style. Shalom-Salam, Werner -- The pioneers of a warless world are the youth that refuse military service. - A. Einstein
openpgp-digital-signature.asc
Description: PGP signature
_______________________________________________ Gnupg-devel mailing list Gnupg-devel@gnupg.org https://lists.gnupg.org/mailman/listinfo/gnupg-devel