Skip to content

Commit 120c964

Browse files
committed
Avoid __dead macro on non-BSD to prevent reserved identifier warnings
Apple clang may warn about defining macros with reserved names (double underscore prefix). On non-BSD platforms, define __dead as empty instead of __attribute__((noreturn)) since the noreturn hint is optional.
1 parent efe67c9 commit 120c964

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

thinproxy.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@
6666

6767
/* ---- portability ---- */
6868

69-
#ifndef __dead
70-
#define __dead __attribute__((__noreturn__))
69+
#ifdef __OpenBSD__
70+
/* __dead provided by <sys/cdefs.h> */
71+
#elif !defined(__dead)
72+
#define __dead /* empty */
7173
#endif
7274

7375
/*

0 commit comments

Comments
 (0)