Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Package/Library/net_snmp.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ public function patchBeforeBuild(LibraryPackage $lib): void
FileSystem::replaceFileStr("{$lib->getSourceDir()}/configure", 'LIBS="-lssl ${OPENSSL_LIBS}"', 'LIBS="-lssl ${OPENSSL_LIBS} -lpthread -ldl"');
}

#[PatchBeforeBuild]
#[PatchDescription('Silence expected missing OpenSSL legacy provider warning')]
public function patchLegacyProviderWarning(LibraryPackage $lib): void
{
// net-snmp 5.10 logs a warning at library init when the legacy provider is
// unavailable. static-php builds OpenSSL with no-legacy, so the provider is
// intentionally absent and the warning breaks CLI smoke tests.
FileSystem::replaceFileStr(
"{$lib->getSourceDir()}/snmplib/scapi.c",
" if (legacy_provider == NULL)\n snmp_log(LOG_WARNING, \"Failed to load OpenSSL legacy provider\\n\");",
' /* static-php builds OpenSSL with no-legacy: a missing legacy provider is expected */'
);
}

#[BuildFor('Darwin')]
#[BuildFor('Linux')]
public function buildUnix(LibraryPackage $lib): void
Expand Down
Loading