1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[alignof] Compilation fix

This commit is contained in:
Witold Filipczyk 2021-01-13 21:52:41 +01:00
parent 38cd5410bf
commit 9254649aaf

View File

@ -100,7 +100,7 @@ safe_write(int fd, const void *buf, size_t count) {
#if !defined(alignof) && ((!defined(__cplusplus) || __cplusplus < 201103L)) #if !defined(alignof) && ((!defined(__cplusplus) || __cplusplus < 201103L))
/* Alignment of types. */ /* Alignment of types. */
#define alignof(TYPE) offsetof(struct { unsigned char dummy1; TYPE dummy; }, dummy2) #define alignof(TYPE) offsetof(struct { unsigned char dummy1; TYPE dummy2; }, dummy2)
#endif #endif
/* Using this macro to copy structs is both faster and safer than /* Using this macro to copy structs is both faster and safer than