mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
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:
parent
b1ed15a07a
commit
75515af537
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue