mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
* Tools/gdomap.c (init_iface): Round size to make sure we don't violate
pointer alignment boundaries. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21128 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c0c319001e
commit
684152e98e
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-04-19 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Tools/gdomap.c (init_iface): Round size to make sure we don't violate
|
||||
pointer alignment boundaries.
|
||||
|
||||
2005-04-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/GSMime.m: Add tweak to cope with buggy mailers
|
||||
|
|
|
@ -128,6 +128,10 @@
|
|||
|
||||
#define MAX_EXTRA ((GDO_NAME_MAX_LEN - 2 * IASIZE)/IASIZE)
|
||||
|
||||
#define ROUND(V, A) \
|
||||
({ typeof(V) __v=(V); typeof(A) __a=(A); \
|
||||
__a*((__v+__a-1)/__a); })
|
||||
|
||||
typedef unsigned char *uptr;
|
||||
#ifndef __MINGW__
|
||||
static int is_daemon = 0; /* Currently running as daemon. */
|
||||
|
@ -1265,7 +1269,8 @@ init_iface()
|
|||
{
|
||||
ifreq = *(struct ifreq*)ifr_ptr;
|
||||
#ifdef HAVE_SA_LEN
|
||||
ifr_ptr += sizeof(ifreq) - sizeof(ifreq.ifr_addr) + ifreq.ifr_addr.sa_len;
|
||||
ifr_ptr += sizeof(ifreq) - sizeof(ifreq.ifr_addr)
|
||||
+ ROUND(ifreq.ifr_addr.sa_len, sizeof(struct ifreq*));
|
||||
#else
|
||||
ifr_ptr += sizeof(ifreq);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue