mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-15 02:06:09 +02:00
BUILD: compiler: fix redefinition of __nonstring
Dmitry Sivachenko reported a build warning on FreeBSD -dev, where __nonstring is apparently already defined. Let's guard our own definition to avoid such issues. It could make sense to backport this to recent stable versions which may soon be exposed to modern compilers.
This commit is contained in:
parent
648b5b6e50
commit
58f3e191e8
@ -583,10 +583,12 @@
|
||||
* for such array declarations. But it's not the case for clang and other
|
||||
* compilers.
|
||||
*/
|
||||
#if __has_attribute(nonstring)
|
||||
#define __nonstring __attribute__ ((nonstring))
|
||||
#else
|
||||
#define __nonstring
|
||||
#ifndef __nonstring
|
||||
# if __has_attribute(nonstring)
|
||||
# define __nonstring __attribute__ ((nonstring))
|
||||
# else
|
||||
# define __nonstring
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _HAPROXY_COMPILER_H */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user