summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5d166cc)
raw | patch | inline | side by side (parent: 5d166cc)
author | Benjamin Kramer <benny.kra@googlemail.com> | |
Wed, 18 Nov 2009 13:53:27 +0000 (14:53 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 25 Nov 2009 08:16:38 +0000 (00:16 -0800) |
There are some places in git where a long is passed to htonl/ntohl. llvm
doesn't support matching operands of different bitwidths intentionally.
This patch fixes the build with llvm-gcc (and clang) on x86_64.
Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
doesn't support matching operands of different bitwidths intentionally.
This patch fixes the build with llvm-gcc (and clang) on x86_64.
Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/bswap.h | patch | blob | history |
diff --git a/compat/bswap.h b/compat/bswap.h
index 279e0b48b15e091fc0ca975c3efbd461ab02c149..f3b8c44181776a99c3eb79e15542104d67001c9d 100644 (file)
--- a/compat/bswap.h
+++ b/compat/bswap.h
if (__builtin_constant_p(x)) { \
__res = default_swab32(x); \
} else { \
- __asm__("bswap %0" : "=r" (__res) : "0" (x)); \
+ __asm__("bswap %0" : "=r" (__res) : "0" ((uint32_t)(x))); \
} \
__res; })