diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-20 16:07:47 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-20 16:13:20 +0200 |
commit | 78a372464b3dabb1a84279fe5fde9542bd2431f3 (patch) | |
tree | 7b80a70a9c59a94de04838e57d717941078cd58f /src/apk_defines.h | |
parent | 51999c97dabf9fbbe352ca3ead02851a982fcade (diff) | |
download | apk-tools-78a372464b3dabb1a84279fe5fde9542bd2431f3.tar.gz apk-tools-78a372464b3dabb1a84279fe5fde9542bd2431f3.tar.bz2 apk-tools-78a372464b3dabb1a84279fe5fde9542bd2431f3.tar.xz apk-tools-78a372464b3dabb1a84279fe5fde9542bd2431f3.zip |
all: fix array size data type on 64 bit
The array struct aligned size to 64 bit on x86_64 which caused bad things
to happen.
We use size_t to make sure the size element is correct regardless arch.
Solution found by Timo.
Diffstat (limited to 'src/apk_defines.h')
-rw-r--r-- | src/apk_defines.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h index 90ad3a0..bfba275 100644 --- a/src/apk_defines.h +++ b/src/apk_defines.h @@ -87,7 +87,7 @@ void *apk_array_resize(void *array, size_t new_size, size_t elem_size); #define APK_ARRAY(array_type_name, elem_type_name) \ struct array_type_name { \ - int num; \ + size_t num; \ elem_type_name item[]; \ }; \ static inline void \ |