summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conf.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-11-15 11:59:03 +0300
committerValentin Bartenev <vbart@nginx.com>2018-11-15 11:59:03 +0300
commit08e0082e070354919de9584a8d26436a1dadeac0 (patch)
tree591625fc491ae35fe3c249b6bbfd2431ac5d4da9 /src/nxt_conf.c
parented8bfc669f0c6ac2b7cb367f6adcdf756b2f6cca (diff)
downloadunit-08e0082e070354919de9584a8d26436a1dadeac0.tar.gz
unit-08e0082e070354919de9584a8d26436a1dadeac0.tar.bz2
Fixed discovering of modules on 64-bit big-endian systems.
The nxt_conf_map_object() function used nxt_int_t for NXT_CONF_MAP_INT, which was 8 bytes long on 64-bit systems. But the nxt_port_main_start_worker_handler() used it to map into the int field of the nxt_common_app_conf_t structure, which was 4 bytes. As the result, on a 64-bit big-endian system all the meaningful module type numbers were assigned into the gap above the "type" field. The bug was discovered on IBM/S390x.
Diffstat (limited to '')
-rw-r--r--src/nxt_conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_conf.c b/src/nxt_conf.c
index 1aeafc06..2255e12f 100644
--- a/src/nxt_conf.c
+++ b/src/nxt_conf.c
@@ -525,7 +525,7 @@ nxt_conf_map_object(nxt_mp_t *mp, nxt_conf_value_t *value, nxt_conf_map_t *map,
uint8_t ui8;
int32_t i32;
int64_t i64;
- nxt_int_t i;
+ int i;
ssize_t size;
off_t off;
nxt_msec_t msec;