]> git.puffer.fish Git - mirror/frr.git/commit
lib: consolidate flexible array hack in a single place 6153/head
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 3 Apr 2020 23:10:04 +0000 (20:10 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sat, 4 Apr 2020 01:34:55 +0000 (22:34 -0300)
commitdc397e4c0adc13982fc5d83a1afc42178708f4a5
tree51892299f346e78f273edf551e800e63f1b07697
parentb90204a8e99808378621e50f8e586e6eabb30b76
lib: consolidate flexible array hack in a single place

Old gcc versions (< 5.x) have a bug that prevents C99 flexible
arrays from working properly on shared libraries.

We already have a hack in place to work around this problem, but it
needs to be replicated in every declaration of a frr_yang_module_info
variable within libfrr. This clearly isn't a good solution if we
consider that many more libfrr YANG modules are about to come in
the future.

This commit introduces a different workaround that operates within
the northbound layer itself, such that implementers of libfrr YANG
modules won't need to worry about this problem anymore.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/if.c
lib/northbound.c
lib/northbound.h
lib/routemap_northbound.c