]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Rename a #define that's also define by Illumos.
authorGuy Harris <[email protected]>
Mon, 7 Apr 2025 21:13:09 +0000 (14:13 -0700)
committerGuy Harris <[email protected]>
Mon, 7 Apr 2025 22:05:54 +0000 (15:05 -0700)
diag-control.h
netdissect.c

index 2a73a87a9b6ccde0d0cf469d1c5f00644449d246..cab266b65a81b6ec8c6ad1b34048e0632d5ad16a 100644 (file)
 
 /*
  * GCC needs this on AIX for longjmp().
+ *
+ * We call it ND_NOT_REACHABLE rather than ND_UNREACHABLE, as, at
+ * least on some versions of Illumos (and Solaris?), ND_UNREACHABLE
+ * is defined differently by <net/if.h>.
  */
 #if ND_IS_AT_LEAST_GNUC_VERSION(5,1)
   /*
    * squelch the warning and ruin the process too, albeit in a different way).
    * So please remember to use this very carefully.
    */
-  #define ND_UNREACHABLE __builtin_unreachable();
+  #define ND_NOT_REACHABLE __builtin_unreachable();
 #endif
 
 #ifndef DIAG_OFF_ASSIGN_ENUM
 #ifndef DIAG_ON_STRICT_PROTOTYPES
 #define DIAG_ON_STRICT_PROTOTYPES
 #endif
-#ifndef ND_UNREACHABLE
-#define ND_UNREACHABLE
+#ifndef ND_NOT_REACHABLE
+#define ND_NOT_REACHABLE
 #endif
 
 #endif /* _diag_control_h */
index a377a4828d4c1df8f32fee9a1e88b28750ee079c..2209c10e039847c03d7764ef63f0d03708c75bfe 100644 (file)
@@ -312,6 +312,6 @@ nd_trunc_longjmp(netdissect_options *ndo)
         * XL C that the function is noreturn, but GCC remains unaware of that and
         * yields a "'noreturn' function does return" warning.
         */
-       ND_UNREACHABLE
+       ND_NOT_REACHABLE
 #endif /* _AIX */
 }