configure: only define special attributes if not defined

Fixes a build warning on FreeBSD, where <sys/cdefs.h> defines __packed and
friends.
This commit is contained in:
David Adam 2015-07-29 21:13:38 +08:00
parent b1ed15a07a
commit 75515af537

View file

@ -107,9 +107,15 @@ AC_CONFIG_HEADERS(config.h)
#
AH_BOTTOM([#if __GNUC__ >= 3
#ifndef __warn_unused
#define __warn_unused __attribute__ ((warn_unused_result))
#endif
#ifndef __sentinel
#define __sentinel __attribute__ ((sentinel))
#endif
#ifndef __packed
#define __packed __attribute__ ((packed))
#endif
#else
#define __warn_unused
#define __sentinel