Use intra-DSO calls when we build libbusybox. No-op for normal build.
[oweals/busybox.git] / networking / libiproute / utils.h
index 2c4dffd95ef36ffcf7a3bab421289f71a117c974..b67619d20030f08e2998453d9c5eec3adaa258da 100644 (file)
@@ -6,7 +6,11 @@
 #include "ll_map.h"
 #include "rtm_map.h"
 
-extern int preferred_family;
+#if __GNUC_PREREQ(4,1)
+# pragma GCC visibility push(hidden)
+#endif
+
+extern family_t preferred_family;
 extern smallint show_stats;    /* UNUSED */
 extern smallint show_details;  /* UNUSED */
 extern smallint show_raw;      /* UNUSED */
@@ -26,7 +30,7 @@ extern char _SL_;
 
 extern void incomplete_command(void) ATTRIBUTE_NORETURN;
 
-#define NEXT_ARG() do { argv++; if (--argc <= 0) incomplete_command(); } while (0)
+#define NEXT_ARG() do { if (!*++argv) incomplete_command(); } while (0)
 
 typedef struct
 {
@@ -42,8 +46,8 @@ typedef struct
 #endif
 
 struct dn_naddr {
-       unsigned short          a_len;
-       unsigned char a_addr[DN_MAXADDL];
+       unsigned short a_len;
+       unsigned char  a_addr[DN_MAXADDL];
 };
 
 #define IPX_NODE_LEN 6
@@ -84,4 +88,8 @@ int dnet_pton(int af, const char *src, void *addr);
 const char *ipx_ntop(int af, const void *addr, char *str, size_t len);
 int ipx_pton(int af, const char *src, void *addr);
 
+#if __GNUC_PREREQ(4,1)
+# pragma GCC visibility pop
+#endif
+
 #endif /* __UTILS_H__ */