Fix -Werror=cast-align error on 32 bit platform
Fixes GH-172
This commit is contained in:
parent
4de8db523f
commit
dbd0f032ce
|
@ -39,6 +39,7 @@ PATH=$TOOLCHAIN/bin:$PATH
|
||||||
--without-libxml2 \
|
--without-libxml2 \
|
||||||
--disable-python-bindings \
|
--disable-python-bindings \
|
||||||
--disable-examples \
|
--disable-examples \
|
||||||
|
--enable-werror \
|
||||||
CC=clang \
|
CC=clang \
|
||||||
CXX=clang++ \
|
CXX=clang++ \
|
||||||
CPPFLAGS="-I$PREFIX/include" \
|
CPPFLAGS="-I$PREFIX/include" \
|
||||||
|
|
|
@ -549,6 +549,10 @@ if test "x$have_struct_tm_tm_gmtoff" = "xyes"; then
|
||||||
[Define to 1 if you have `struct tm.tm_gmtoff` member.])
|
[Define to 1 if you have `struct tm.tm_gmtoff` member.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check size of pointer to decide we need 8 bytes alignment
|
||||||
|
# adjustment.
|
||||||
|
AC_CHECK_SIZEOF([int *])
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
if test "x$cross_compiling" != "xyes"; then
|
if test "x$cross_compiling" != "xyes"; then
|
||||||
AC_FUNC_MALLOC
|
AC_FUNC_MALLOC
|
||||||
|
|
|
@ -40,6 +40,10 @@ typedef uint32_t key_type;
|
||||||
typedef struct nghttp2_map_entry {
|
typedef struct nghttp2_map_entry {
|
||||||
struct nghttp2_map_entry *next;
|
struct nghttp2_map_entry *next;
|
||||||
key_type key;
|
key_type key;
|
||||||
|
#if SIZEOF_INT_P == 4
|
||||||
|
/* we requires 8 bytes aligment */
|
||||||
|
int64_t pad;
|
||||||
|
#endif
|
||||||
} nghttp2_map_entry;
|
} nghttp2_map_entry;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -119,6 +119,7 @@ static int stream_push_item(nghttp2_stream *stream, nghttp2_session *session) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
rv = 0;
|
||||||
/* should not reach here */
|
/* should not reach here */
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue