Module Name: src Committed By: christos Date: Sat Jul 14 23:42:23 UTC 2018
Modified Files: src/external/gpl3/gcc/dist/libiberty: sha1.c Log Message: clang does not like the c-like definition of alignof To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/gpl3/gcc/dist/libiberty/sha1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/gcc/dist/libiberty/sha1.c diff -u src/external/gpl3/gcc/dist/libiberty/sha1.c:1.1.1.2 src/external/gpl3/gcc/dist/libiberty/sha1.c:1.2 --- src/external/gpl3/gcc/dist/libiberty/sha1.c:1.1.1.2 Sat Mar 1 03:41:40 2014 +++ src/external/gpl3/gcc/dist/libiberty/sha1.c Sat Jul 14 19:42:23 2018 @@ -230,7 +230,11 @@ sha1_process_bytes (const void *buffer, if (len >= 64) { #if !_STRING_ARCH_unaligned +# ifdef __clang__ +# define alignof(type) __alignof__(type) +# else # define alignof(type) offsetof (struct { char c; type x; }, x) +# endif # define UNALIGNED_P(p) (((size_t) p) % alignof (sha1_uint32) != 0) if (UNALIGNED_P (buffer)) while (len > 64)