diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-08-02 13:01:54 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-08-02 13:01:54 +0300 |
commit | 83d7ab38acb2ecf917fc66e6aefddff7cb5f7169 (patch) | |
tree | 440e089c8b1400d1a6509bd37fd31d1509198341 | |
parent | 145eeb84764109841b03ba3eba25ac30b287c781 (diff) | |
download | unit-83d7ab38acb2ecf917fc66e6aefddff7cb5f7169.tar.gz unit-83d7ab38acb2ecf917fc66e6aefddff7cb5f7169.tar.bz2 |
Using old-style packed attribute specification for compatibility.
Diffstat (limited to '')
-rw-r--r-- | auto/clang | 5 | ||||
-rw-r--r-- | src/nxt_conf.c | 8 |
2 files changed, 7 insertions, 6 deletions
@@ -153,9 +153,10 @@ nxt_feature_name=NXT_HAVE_GCC_ATTRIBUTE_PACKED nxt_feature_run= nxt_feature_path= nxt_feature_libs= -nxt_feature_test="struct __attribute__ ((__packed__)) s { +nxt_feature_test="struct s { char c; - }; + int i; + } __attribute__ ((__packed__)); int main() { return 1; diff --git a/src/nxt_conf.c b/src/nxt_conf.c index caa2a154..15b6a615 100644 --- a/src/nxt_conf.c +++ b/src/nxt_conf.c @@ -42,7 +42,7 @@ typedef struct nxt_conf_object_s nxt_conf_object_t; struct nxt_conf_value_s { - union nxt_packed { + union { uint8_t boolean; /* 1 bit. */ int64_t integer; double number; @@ -52,14 +52,14 @@ struct nxt_conf_value_s { u_char start[NXT_CONF_MAX_SHORT_STRING]; } str; - struct nxt_packed { + struct { u_char *start; uint32_t length; - } string; + } nxt_packed string; nxt_conf_array_t *array; nxt_conf_object_t *object; - } u; + } nxt_packed u; uint8_t type; /* 3 bits. */ } nxt_aligned(8); |