diff options
author | Anders Svensson <[email protected]> | 2011-08-16 17:01:45 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2011-08-16 17:01:45 +0200 |
commit | a7c0e439ee84d25ce18f65959be06315063a7de8 (patch) | |
tree | b5a54174171fdd0f10d556c8a96909eb4af7f1d6 /lib/erl_interface | |
parent | 5a57f3798edd56caa61514378c673ff78ac397d2 (diff) | |
parent | 46af29aac0e851105620dab25644cf27219e2b0a (diff) | |
download | otp-a7c0e439ee84d25ce18f65959be06315063a7de8.tar.gz otp-a7c0e439ee84d25ce18f65959be06315063a7de8.tar.bz2 otp-a7c0e439ee84d25ce18f65959be06315063a7de8.zip |
Merge remote branch 'upstream/dev' into dev
Diffstat (limited to 'lib/erl_interface')
-rw-r--r-- | lib/erl_interface/src/connect/ei_resolve.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/erl_interface/src/connect/ei_resolve.c b/lib/erl_interface/src/connect/ei_resolve.c index 50c5a4161d..ba8f8fbce3 100644 --- a/lib/erl_interface/src/connect/ei_resolve.c +++ b/lib/erl_interface/src/connect/ei_resolve.c @@ -185,7 +185,12 @@ static int verify_dns_configuration(void) * align: increment buf until it is dword-aligned, reduce len by same amount. * advance: increment buf by n bytes, reduce len by same amount . */ -#define align_buf(buf,len) for (;(((unsigned)buf)&0x3); (buf)++, len--) +#if defined SIZEOF_VOID_P +#define ALIGNBYTES (SIZEOF_VOID_P - 1) +#else +#define ALIGNBYTES (sizeof(void*) - 1) +#endif +#define align_buf(buf,len) for (;(((unsigned)buf) & ALIGNBYTES); (buf)++, len--) #define advance_buf(buf,len,n) ((buf)+=(n),(len)-=(n)) /* "and now the tricky part..." */ |