diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-04-13 20:00:25 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-04-13 20:00:25 +0200 |
commit | 1f8dc227cdd425f1313f564fd074c614bb1954a3 (patch) | |
tree | a19a89983eff1a9395d1c9900192da2218de2d41 | |
parent | a4eca2d98c01e39bc12e284a257cf2f684104011 (diff) |
make avl_strcmp globally visible
-rw-r--r-- | device.c | 5 | ||||
-rw-r--r-- | main.c | 5 | ||||
-rw-r--r-- | netifd.h | 1 |
3 files changed, 6 insertions, 5 deletions
@@ -10,11 +10,6 @@ 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); @@ -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" @@ -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 |