brew's "openssl" alias follows the newest major (now openssl@4), so
`brew --prefix openssl` returns a prefix that isn't installed on setups
with only openssl@3, and the build fails with evp.h / des.h not found.
Probe the candidate kegs and use the first that actually has the headers.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The hardcoded openssl@3.6 include path fails macOS CI when that formula
is absent. Ask brew for the installed OpenSSL prefix and use it for
both headers and libraries.
Built all three mfd_aes_brute tools with Clang and GCC 16 against
OpenSSL 3 and 4 on macOS. Existing linker deprecation warnings remain.
Openssl@1.1 was disabled 2024-10-24 due to not being supported upstream and blocked from install. Updated to openssl@3.5 in order for compilation to be successful on machines installed after that date. Older machines is encouraged to update.
Signed-off-by: apply-science <106422483+apply-science@users.noreply.github.com>
unistd.h in macos has this snippet:
#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
#define _SC_NPROCESSORS_CONF 57
#define _SC_NPROCESSORS_ONLN 58
#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
__DARWIN_C_FULL is 900000L.
If _POSIX_C_SOURCE gets defined without __DARWIN_C_SOURCE being defined,
__DARWIN_C_LEVEL will be assigned to __DARWIN_C_ANSI, which is 010000L.
Thus this definition will remove _SC_NPROCESSORS_CONF.
If we don't define _POSIX_C_SOURCE, __DARWIN_C_LEVEL will be equal to
__DARWIN_C_FULL, and _SC_NPROCESSORS_CONF will be available.
This commit also includes homebrew and macports prefix definitions for mfd_aes_brute.
Signed-off-by: İlteriş Yağıztegin Eroğlu <ilteris@asenkron.com.tr>