summaryrefslogtreecommitdiff
path: root/linux-user/syscall_defs.h
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2011-08-12 19:57:41 +0200
committerRiku Voipio <riku.voipio@linaro.org>2011-10-27 14:42:16 +0300
commitcbb21eed186647716b9e8404a9e90d3fc5c6c467 (patch)
treef02e1908ef5ecb968a058adbe82cea772a4b2ea9 /linux-user/syscall_defs.h
parent6cafd027be3a6cad710d99bde4a2b3b662869e5d (diff)
downloadqemu-cbb21eed186647716b9e8404a9e90d3fc5c6c467.tar.gz
linux-user: fix abi_(u)long, target_ulong mismatch
abi_(u)long might be different from target_ulong, so don't use tswapl but introduce a new tswapal Signed-off-by: Matthias Braun <matze@braunis.de> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'linux-user/syscall_defs.h')
-rw-r--r--linux-user/syscall_defs.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 5fd4c9ce45..9dd1b8e4cf 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -209,9 +209,9 @@ __target_cmsg_nxthdr (struct target_msghdr *__mhdr, struct target_cmsghdr *__cms
struct target_cmsghdr *__ptr;
__ptr = (struct target_cmsghdr *)((unsigned char *) __cmsg
- + TARGET_CMSG_ALIGN (tswapl(__cmsg->cmsg_len)));
- if ((unsigned long)((char *)(__ptr+1) - (char *)(size_t)tswapl(__mhdr->msg_control))
- > tswapl(__mhdr->msg_controllen))
+ + TARGET_CMSG_ALIGN (tswapal(__cmsg->cmsg_len)));
+ if ((unsigned long)((char *)(__ptr+1) - (char *)(size_t)tswapal(__mhdr->msg_control))
+ > tswapal(__mhdr->msg_controllen))
/* No more entries. */
return (struct target_cmsghdr *)0;
return __cmsg;
@@ -292,7 +292,7 @@ static inline void tswap_sigset(target_sigset_t *d, const target_sigset_t *s)
{
int i;
for(i = 0;i < TARGET_NSIG_WORDS; i++)
- d->sig[i] = tswapl(s->sig[i]);
+ d->sig[i] = tswapal(s->sig[i]);
}
#else
static inline void tswap_sigset(target_sigset_t *d, const target_sigset_t *s)