]> 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 7b7a42d908974cd1101580d120be59a2edd14762..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"