const char *algoname = p->data;
const char *propquery = NULL;
-#ifndef FIPS_MODE /* Inside the FIPS module, we don't support engines */
+/* Inside the FIPS module, we don't support engines */
+#if !defined(FIPS_MODE) && !defined(OPENSSL_NO_ENGINE)
ENGINE_finish(macctx->tmpengine);
macctx->tmpengine = NULL;