Skip to content

gcc 11.x - error: size of array element is not a multiple of its alignment #16

@thkukuk

Description

@thkukuk

With current gcc 11.x you get an error when compiling asignify.
I found more details in this bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1937076

A possible fix could look like according to that bug report:

diff --git a/libasignify/blake2.h b/libasignify/blake2.h
index 5d0d40c..f9967d0 100644
--- a/libasignify/blake2.h
+++ b/libasignify/blake2.h
@@ -56,7 +56,7 @@ extern "C" {
uint8_t personal[BLAKE2B_PERSONALBYTES]; // 64
} blake2b_param;

  • BLAKE_ALIGN( 64 ) typedef struct __blake2b_state
  • typedef struct BLAKE_ALIGN( 64 ) __blake2b_state
    {
    uint64_t h[8];
    uint64_t t[2];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions