rand/rand_unix.c: mask getentropy ELF detection on HP-UX.
authorAndy Polyakov <appro@openssl.org>
Sun, 24 Jun 2018 11:24:27 +0000 (13:24 +0200)
committerAndy Polyakov <appro@openssl.org>
Mon, 25 Jun 2018 14:45:09 +0000 (16:45 +0200)
Unlike other ELF systems, HP-UX run-time linker fails to detect symbol
availability through weak declaration.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6583)

crypto/rand/rand_unix.c

index fafa359d493ffb5e2924a02083fd6170a1c5a984..a545e08d8c28a3cad0c745177e44fe8a23002bed 100644 (file)
@@ -240,7 +240,7 @@ int syscall_random(void *buf, size_t buflen)
      * - Linux since 3.17 with glibc 2.25
      * - FreeBSD since 12.0 (1200061)
      */
-#  if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__)
+#  if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux)
     extern int getentropy(void *bufer, size_t length) __attribute__((weak));
 
     if (getentropy != NULL)