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

Debian bug 464384: fix cast warning in alignof

This commit is contained in:
Kalle Olavi Niemitalo 2008-02-09 00:24:45 +02:00 committed by Kalle Olavi Niemitalo
parent a2c7af990b
commit 3b93dcc472
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -131,6 +131,7 @@ Miscellaneous:
Build system and compile-time errors (ignore if you don't build ELinks):
* serious Debian bug 464384: fix cast warning in alignof
* bug 725: fix version checking for Ruby in 'configure'
* enhancement: if make -k was used and a sub-Make fails, build the
rest before propagating

View File

@ -102,7 +102,7 @@ safe_write(int fd, const void *buf, size_t count) {
/* Alignment of types. */
#define alignof(TYPE) \
((int) &((struct { unsigned char dummy1; TYPE dummy2; } *) 0)->dummy2)
offsetof(struct { unsigned char dummy1; TYPE dummy2; }, dummy2)
/* Using this macro to copy structs is both faster and safer than
* memcpy(destination, source, sizeof(source)). Please, use this macro instead