mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +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
d37e439f79
commit
ca34553f99
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>
|
2005-04-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/Additions/GSMime.m: Add tweak to cope with buggy mailers
|
* 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 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;
|
typedef unsigned char *uptr;
|
||||||
#ifndef __MINGW__
|
#ifndef __MINGW__
|
||||||
static int is_daemon = 0; /* Currently running as daemon. */
|
static int is_daemon = 0; /* Currently running as daemon. */
|
||||||
|
@ -1265,7 +1269,8 @@ init_iface()
|
||||||
{
|
{
|
||||||
ifreq = *(struct ifreq*)ifr_ptr;
|
ifreq = *(struct ifreq*)ifr_ptr;
|
||||||
#ifdef HAVE_SA_LEN
|
#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
|
#else
|
||||||
ifr_ptr += sizeof(ifreq);
|
ifr_ptr += sizeof(ifreq);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue