build: work with older libnl1 headers
Ubuntu 10.04 shipped with out-of-the-box libnl1 headers, which assumed the old gcc semantics of 'extern inline' as a C89 extension: the function will _always_ be inline if it is used, and that it may be declared extern inline in headers without a definition, as long as the definition occurs before any use. But when C99 added 'extern inline' as a mandatory feature of the language, with slightly different semantics than gcc (the function MUST have external linkage, and the inline definition MUST be present alongside any declaration, where the compiler can then choose which of the two versions to use), this rendered the use of 'inline' in libnl's header obsolete. Most distros already solved this by removing 'inline' (the resulting 'extern' is correct, regardless of gcc semantics), and libnl-3 does not have the problem (where it has switched to 'static inline' instead, again with the definition present, and again, our hack will result in plain 'static' with no ill effects). But for the case of building out of the box, we hack around the broken Ubuntu header. * src/util/virnetlink.h: Work around libnl issue.
Showing
想要评论请 注册 或 登录