commit:     e074e6fa71c94cea6a6693822f33fc3ea6afc1d1
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  5 07:56:44 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jun  5 07:56:44 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e074e6fa

libq/hash: fix compilation without HAVE_SSL and HAVE_BLAKE2B

Bug: https://bugs.gentoo.org/687374
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 libq/hash.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libq/hash.c b/libq/hash.c
index 8ce29d7..32d047a 100644
--- a/libq/hash.c
+++ b/libq/hash.c
@@ -131,6 +131,7 @@ hash_compute_file(
 
        while ((len = fread(data, 1, sizeof(data), f)) > 0) {
                *flen += len;
+#if defined(HAVE_SSL) || defined(HAVE_BLAKE2B)
 #pragma omp parallel sections
                {
 #ifdef HAVE_SSL
@@ -158,9 +159,11 @@ hash_compute_file(
                        }
 #endif
                }
+#endif /* HAVE_SSL || HAVE_BLAKE2B */
        }
        fclose(f);
 
+#if defined(HAVE_SSL) || defined(HAVE_BLAKE2B)
 #pragma omp parallel sections
        {
 #ifdef HAVE_SSL
@@ -199,4 +202,5 @@ hash_compute_file(
                }
 #endif
        }
+#endif /* HAVE_SSL || HAVE_BLAKE2B */
 }

Reply via email to