More accurate "packed" attribute declaration.

This commit is contained in:
Valentin Bartenev
2017-07-18 17:13:40 +03:00
parent beb4de21bb
commit 9d707800b0
2 changed files with 26 additions and 2 deletions

View File

@@ -121,6 +121,17 @@ nxt_prefetch(a)
#endif
#if (NXT_HAVE_GCC_ATTRIBUTE_PACKED)
#define nxt_packed __attribute__((__packed__))
#else
#define nxt_packed
#endif
#ifndef NXT_ALIGNMENT
#if (NXT_SOLARIS)
@@ -230,6 +241,4 @@ nxt_trunc_ptr(p, a) \
(u_char *) ((uintptr_t) (p) & ~((uintptr_t) (a) - 1))
#define NXT_PACKED __attribute__((packed))
#endif /* _NXT_CLANG_H_INCLUDED_ */