Commit c5022c31 authored by Peter Maydell's avatar Peter Maydell Committed by Paolo Bonzini
Browse files

scripts/update-linux-headers: Handle __aligned_u64



We'll currently replace any 'u64' with a 'uint64_t' including when
it's embedded in an '__aligned_u64', creating a '__aligned_uint64_t'
which doesn't exist. We need to instead expand out the kernel's
definition of __aligned_u64:
   #define __aligned_u64 __u64 __attribute__((aligned(8)))
before we convert the __u64 to uint64_t.

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Message-Id: <20180525132755.21839-3-peter.maydell@linaro.org>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent a8bff79e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -51,7 +51,8 @@ cp_portable() {
    fi

    header=$(basename "$f");
    sed -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \
    sed -e 's/__aligned_u64/__u64 __attribute__((aligned(8)))/g' \
        -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \
        -e 's/u\([0-9][0-9]*\)/uint\1_t/g' \
        -e 's/__s\([0-9][0-9]*\)/int\1_t/g' \
        -e 's/__le\([0-9][0-9]*\)/uint\1_t/g' \