From: George Thessalonikefs Date: Tue, 7 Jan 2020 13:19:15 +0000 (+0200) Subject: - Changes to compat/getentropy_solaris.c for, X-Git-Tag: release-1.10.0rc1~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8686b0abbf63cb03d22bb6535d79f1f8cf5d7fa3;p=thirdparty%2Funbound.git - Changes to compat/getentropy_solaris.c for, ifdef stdint.h inclusion for older systems. ifdef sha2.h inclusion for older systems. --- diff --git a/compat/getentropy_solaris.c b/compat/getentropy_solaris.c index cfd5b7047..5e3b1cbbb 100644 --- a/compat/getentropy_solaris.c +++ b/compat/getentropy_solaris.c @@ -16,6 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "config.h" #include #include @@ -29,7 +30,9 @@ #include #include #include +#ifdef HAVE_STDINT_H #include +#endif #include #include #include @@ -38,10 +41,14 @@ #include #include #include +#ifdef HAVE_SYS_SHA2_H #include #define SHA512_Init SHA512Init #define SHA512_Update SHA512Update #define SHA512_Final SHA512Final +#else +#include "openssl/sha.h" +#endif #include #include @@ -64,7 +71,9 @@ int getentropy(void *buf, size_t len); +#ifdef CAN_REFERENCE_MAIN extern int main(int, char *argv[]); +#endif static int gotdata(char *buf, size_t len); static int getentropy_urandom(void *buf, size_t len, const char *path, int devfscheck); @@ -297,7 +306,9 @@ getentropy_fallback(void *buf, size_t len) HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1, sigset); +#ifdef CAN_REFERENCE_MAIN HF(main); /* an addr in program */ +#endif HF(getentropy); /* an addr in this library */ HF(printf); /* an addr in libc */ p = (char *)&p; diff --git a/doc/Changelog b/doc/Changelog index 6626bcc0c..e6d42a2e8 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,9 @@ - Downgrade compat/getentropy_solaris.c to version 1.4 from OpenBSD. The dl_iterate_phdr() function introduced in newer versions raises compilation errors on solaris 10. + - Changes to compat/getentropy_solaris.c for, + ifdef stdint.h inclusion for older systems. + ifdef sha2.h inclusion for older systems. 6 January 2020: Wouter - Merge #135 from Florian Obser: Use passed in neg and key cache