[Pkg-gnupg-commit] [gpgme] 23/132: Fix Qgpgme build for macos

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Apr 26 01:01:17 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gpgme.

commit efe58fe011f195d98adb4f03b1e1068a26ba287b
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Jan 11 15:52:44 2017 +0100

    Fix Qgpgme build for macos
    
    * lang/qt/src/dn.cpp: Include string.h
    (parse_dn_part): Use qstrdup.
    * lang/qt/tests/t-support.h (getPassphrase): Use qstrdup.
---
 lang/qt/src/dn.cpp        | 4 +++-
 lang/qt/tests/t-support.h | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lang/qt/src/dn.cpp b/lang/qt/src/dn.cpp
index 0f81a4c..3376aef 100644
--- a/lang/qt/src/dn.cpp
+++ b/lang/qt/src/dn.cpp
@@ -37,6 +37,8 @@
 
 #include "dn.h"
 
+#include <strings.h>
+
 static const struct {
     const char *name;
     const char *oid;
@@ -165,7 +167,7 @@ parse_dn_part(DnPair *array, const unsigned char *string)
     for (unsigned int i = 0; i < numOidMaps; ++i)
         if (!strcasecmp((char *)p, oidmap[i].oid)) {
             free(p);
-            p = strdup(oidmap[i].name);
+            p = qstrdup(oidmap[i].name);
             break;
         }
     array->key = p;
diff --git a/lang/qt/tests/t-support.h b/lang/qt/tests/t-support.h
index 704fab4..2630b7d 100644
--- a/lang/qt/tests/t-support.h
+++ b/lang/qt/tests/t-support.h
@@ -42,7 +42,7 @@ public:
     char *getPassphrase(const char * /*useridHint*/, const char * /*description*/,
                         bool /*previousWasBad*/, bool &/*canceled*/) Q_DECL_OVERRIDE
     {
-        return strdup("abc");
+        return qstrdup("abc");
     }
 };
 } // namespace GpgME

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git



More information about the Pkg-gnupg-commit mailing list