From: Коренберг Марк (ноутбук дома) Date: Thu, 7 Jun 2012 17:48:28 +0000 (+0600) Subject: Fix compilation with clang X-Git-Tag: libnl3_2_11~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2275bb0aaaf40bcf617fbf4bfd47ea5ae2d00fe6;p=libnl Fix compilation with clang classid_exit unnecessarily used gcc-only closure. conversion to simple static function works OK. --- diff --git a/lib/route/classid.c b/lib/route/classid.c index da531bd..7b52de8 100644 --- a/lib/route/classid.c +++ b/lib/route/classid.c @@ -438,12 +438,13 @@ static void __init classid_init(void) fprintf(stderr, "Failed to read classid file: %s\n", nl_geterror(err)); } +static void free_map(void *map) { + free(((struct classid_map *)map)->name); + free(map); +}; + static void __exit classid_exit(void) { - void free_map(void *map) { - free(((struct classid_map *)map)->name); - free(map); - }; tdestroy(id_root, free_map); } /** @} */