summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeal Gompa <ngompa13@gmail.com>2019-10-19 20:09:11 -0400
committerPanu Matilainen <pmatilai@redhat.com>2019-11-18 12:46:29 +0200
commit37e3f64481d055d36f35bb89bda22050131759a3 (patch)
tree8026488294d650d0daf92ae10fb1de39cf2ff541
parentc454e1e099d006f1f62d2d8de342b5a9c51275c8 (diff)
downloadrpm-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.c2
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