Files
macports-ports/net/aria2/files/patch-src-SimpleRandomizer.cc.diff
aeiouaeiouaeiouaeiouaeiouaeiouandMarius Schamschula 8b754aa078 aria2: build with gnutls by default, remove redundant variants
* refactor simplerandomizer patch
* add zlib dependency
* remove platforms line
* revbump to refresh binaries
* drop macOS Tiger support

Closes: https://trac.macports.org/ticket/69221
Closes: https://trac.macports.org/ticket/69694
2026-03-08 07:41:31 -05:00

33 lines
768 B
Diff

--- src/SimpleRandomizer.cc.orig
+++ src/SimpleRandomizer.cc
@@ -41,9 +41,9 @@
#include <cstring>
#include <iostream>
-#ifdef __APPLE__
+#ifdef HAVE_APPLETLS
# include <Security/SecRandom.h>
-#endif // __APPLE__
+#endif // HAVE_APPLETLS
#ifdef HAVE_LIBGNUTLS
# include <gnutls/crypto.h>
@@ -106,7 +106,7 @@
assert(r);
abort();
}
-#elif defined(__APPLE__)
+#elif defined(HAVE_APPLETLS)
auto rv = SecRandomCopyBytes(kSecRandomDefault, len, buf);
assert(errSecSuccess == rv);
#elif defined(HAVE_LIBGNUTLS)
@@ -148,7 +148,7 @@
assert(0);
abort();
}
-#endif // !__MINGW32__ && !__APPLE__ && !HAVE_OPENSSL && !HAVE_LIBGNUTLS
+#endif // !__MINGW32__ && !HAVE_APPLETLS && !HAVE_OPENSSL && !HAVE_LIBGNUTLS
}
} // namespace aria2