Skip to content

Commit a88068e

Browse files
committed
Rename a #define that's also define by Illumos.
1 parent c602726 commit a88068e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

diag-control.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@
193193

194194
/*
195195
* GCC needs this on AIX for longjmp().
196+
*
197+
* We call it ND_NOT_REACHABLE rather than ND_UNREACHABLE, as, at
198+
* least on some versions of Illumos (and Solaris?), ND_UNREACHABLE
199+
* is defined differently by <net/if.h>.
196200
*/
197201
#if ND_IS_AT_LEAST_GNUC_VERSION(5,1)
198202
/*
@@ -202,7 +206,7 @@
202206
* squelch the warning and ruin the process too, albeit in a different way).
203207
* So please remember to use this very carefully.
204208
*/
205-
#define ND_UNREACHABLE __builtin_unreachable();
209+
#define ND_NOT_REACHABLE __builtin_unreachable();
206210
#endif
207211

208212
#ifndef DIAG_OFF_ASSIGN_ENUM
@@ -241,8 +245,8 @@
241245
#ifndef DIAG_ON_STRICT_PROTOTYPES
242246
#define DIAG_ON_STRICT_PROTOTYPES
243247
#endif
244-
#ifndef ND_UNREACHABLE
245-
#define ND_UNREACHABLE
248+
#ifndef ND_NOT_REACHABLE
249+
#define ND_NOT_REACHABLE
246250
#endif
247251

248252
#endif /* _diag_control_h */

netdissect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,6 @@ nd_trunc_longjmp(netdissect_options *ndo)
312312
* XL C that the function is noreturn, but GCC remains unaware of that and
313313
* yields a "'noreturn' function does return" warning.
314314
*/
315-
ND_UNREACHABLE
315+
ND_NOT_REACHABLE
316316
#endif /* _AIX */
317317
}

0 commit comments

Comments
 (0)