aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-04-07 10:27:47 +0000
committerJustus Winter <[email protected]>2017-04-07 10:27:47 +0000
commitbf8b5e9042b3d86d419b2ac1987a9298c9d21500 (patch)
tree120c9946a47bc17a3bad06c4a6f8a6a43d0cd5a8
parentdoc: Explain the '>' in a key listing. (diff)
downloadgnupg-bf8b5e9042b3d86d419b2ac1987a9298c9d21500.tar.gz
gnupg-bf8b5e9042b3d86d419b2ac1987a9298c9d21500.zip
gpgscm: Fix compact vector encoding.
* tests/gpgscm/scheme-private.h (struct cell): Use uintptr_t for '_flags'. This way, '_flags' has the size of a machine word. -- The compact vector representation introduced in 49e2ae65 requires that we can tell apart pointers and type flags. This did not work on 64-bit big-endian architectures. Fixes a crash on 64-bit big-endian architectures. Hat-tip-to: gniibe Fixes-commit: 49e2ae65e892f93be7f87cfaae3392b50a99e4b1 Signed-off-by: Justus Winter <[email protected]>
-rw-r--r--tests/gpgscm/scheme-private.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/gpgscm/scheme-private.h b/tests/gpgscm/scheme-private.h
index abd89e8cb..fe501355d 100644
--- a/tests/gpgscm/scheme-private.h
+++ b/tests/gpgscm/scheme-private.h
@@ -3,6 +3,7 @@
#ifndef _SCHEME_PRIVATE_H
#define _SCHEME_PRIVATE_H
+#include <stdint.h>
#include "scheme.h"
/*------------------ Ugly internals -----------------------------------*/
/*------------------ Of interest only to FFI users --------------------*/
@@ -42,7 +43,7 @@ typedef struct port {
/* cell structure */
struct cell {
- unsigned int _flag;
+ uintptr_t _flag;
union {
struct {
char *_svalue;