diff options
author | Neal Gompa <ngompa13@gmail.com> | 2019-10-19 20:09:11 -0400 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2019-11-18 12:46:29 +0200 |
commit | 37e3f64481d055d36f35bb89bda22050131759a3 (patch) | |
tree | 8026488294d650d0daf92ae10fb1de39cf2ff541 | |
parent | c454e1e099d006f1f62d2d8de342b5a9c51275c8 (diff) | |
download | rpm-37e3f64481d055d36f35bb89bda22050131759a3.tar.gz |
build: Add missing ifdef to conditionalize omp.h include statement
In 464d21dc8c176222c6586e2ee503fec6207f0d29, support for building RPM
without OpenMP was conditionalized on the ENABLE_OPENMP define being
set by the compiler. However, the include statement for omp.h in
parseSpec.c was not conditionalized as everything else was.
Because the conditional was previously missing, RPM fails to build
in environments where OpenMP is completely unavailable. This is the
case in environments such as macOS, as Clang does not provide an
OpenMP implementation there.
(cherry picked from commit 86b698d546663068b0f11539180701e669769827)
-rw-r--r-- | build/parseSpec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/build/parseSpec.c b/build/parseSpec.c index ed5c3ef63..df0069268 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -6,7 +6,9 @@ #include "system.h" #include <errno.h> +#ifdef ENABLE_OPENMP #include <omp.h> +#endif #ifdef HAVE_ICONV #include <iconv.h> #endif |