make avl_strcmp globally visible
authorFelix Fietkau <nbd@openwrt.org>
Wed, 13 Apr 2011 18:00:25 +0000 (20:00 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 13 Apr 2011 18:00:25 +0000 (20:00 +0200)
device.c
main.c
netifd.h

index 34b49d4..31fc467 100644 (file)
--- a/device.c
+++ b/device.c
 
 static struct avl_tree devices;
 
-static int avl_strcmp(const void *k1, const void *k2, void *ptr)
-{
-       return strcmp(k1, k2);
-}
-
 static void API_CTOR dev_init(void)
 {
        avl_init(&devices, avl_strcmp, false, NULL);
diff --git a/main.c b/main.c
index 69aa5cd..4f6a4f6 100644 (file)
--- a/main.c
+++ b/main.c
@@ -6,6 +6,11 @@
 #include "netifd.h"
 #include "ubus.h"
 
+int avl_strcmp(const void *k1, const void *k2, void *ptr)
+{
+       return strcmp(k1, k2);
+}
+
 static int usage(const char *progname)
 {
        fprintf(stderr, "Usage: %s [options]\n"
index 160ea3b..771bcea 100644 (file)
--- a/netifd.h
+++ b/netifd.h
@@ -25,6 +25,7 @@ struct interface;
 extern struct uci_context *uci_ctx;
 extern bool config_init;
 
+int avl_strcmp(const void *k1, const void *k2, void *ptr);
 void config_init_interfaces(const char *name);
 
 #endif