]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/zebra.h
Merge pull request #3356 from opensourcerouting/router-id-loopbacks
[mirror_frr.git] / lib / zebra.h
index b12f6616bae9d4c96f1b4ad290b676cfcbf79e8a..46721cc1ab6d32c7b146f8387efc4fa6cf748a22 100644 (file)
@@ -28,7 +28,6 @@
 #include "compiler.h"
 
 #ifdef SUNOS_5
-#define _XPG4_2
 typedef unsigned int uint32_t;
 typedef unsigned short uint16_t;
 typedef unsigned char uint8_t;
@@ -334,18 +333,18 @@ struct in_pktinfo {
 #endif
 #define MAX(a, b)                                                              \
        ({                                                                     \
-               typeof(a) _a = (a);                                            \
-               typeof(b) _b = (b);                                            \
-               _a > _b ? _a : _b;                                             \
+               typeof(a) _max_a = (a);                                        \
+               typeof(b) _max_b = (b);                                        \
+               _max_a > _max_b ? _max_a : _max_b;                             \
        })
 #ifdef MIN
 #undef MIN
 #endif
 #define MIN(a, b)                                                              \
        ({                                                                     \
-               typeof(a) _a = (a);                                            \
-               typeof(b) _b = (b);                                            \
-               _a < _b ? _a : _b;                                             \
+               typeof(a) _min_a = (a);                                        \
+               typeof(b) _min_b = (b);                                        \
+               _min_a < _min_b ? _min_a : _min_b;                             \
        })
 
 #ifndef offsetof
@@ -380,6 +379,12 @@ struct in_pktinfo {
  */
 #define ZEBRA_HEADER_MARKER              254
 
+/*
+ * The compiler.h header is used for anyone using the CPP_NOTICE
+ * since this is universally needed, let's add it to zebra.h
+ */
+#include "compiler.h"
+
 /* Zebra route's types are defined in route_types.h */
 #include "route_types.h"
 
@@ -414,6 +419,7 @@ extern const char *zserv_command_string(unsigned int command);
 #define ZEBRA_FLAG_FIB_OVERRIDE       0x200
 #define ZEBRA_FLAG_EVPN_ROUTE         0x400
 #define ZEBRA_FLAG_RR_USE_DISTANCE    0x800
+#define ZEBRA_FLAG_ONLINK             0x1000
 /* ZEBRA_FLAG_BLACKHOLE was 0x04 */
 /* ZEBRA_FLAG_REJECT was 0x80 */