From 0676d41ef57db4da469aa9b733f8965606b667ec Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Thu, 6 Aug 2020 09:50:16 +0200 Subject: [PATCH] cpp: Use cstdlib getenv for portability * lang/cpp/src/editinteractor.cpp (EditInteractor::Private::Private): Use std::getenv. -- This should fix compiling on MacOS X GnuPG-Bug-Id: T5013 --- lang/cpp/src/editinteractor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lang/cpp/src/editinteractor.cpp b/lang/cpp/src/editinteractor.cpp index 36d1be63..774903d4 100644 --- a/lang/cpp/src/editinteractor.cpp +++ b/lang/cpp/src/editinteractor.cpp @@ -41,6 +41,7 @@ #include #include +#include #ifndef GPG_ERR_ALREADY_SIGNED # define GPG_ERR_ALREADY_SIGNED GPG_ERR_USER_1 @@ -178,7 +179,7 @@ EditInteractor::Private::Private(EditInteractor *qq) error(), debug(nullptr) { - const char *debug_env = getenv("GPGMEPP_INTERACTOR_DEBUG"); + const char *debug_env = std::getenv("GPGMEPP_INTERACTOR_DEBUG"); if (!debug_env) { return; }