OpenSolaris

Printable Version Enter a New Search
Bug ID 6419029
Synopsis sys/vnode.h pollutes the userland namespace
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:fs
Keywords fsstat
Responsible Engineer Rich Brown
Reported Against s10u2_09a
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_40
Fixed In snv_40
Release Fixed solaris_nevada(snv_40) , solaris_10u3(s10u3_02) (Bug ID:2138165)
Related Bugs 6335370 , 1117261
Submit Date 27-April-2006
Last Update Date 24-May-2006
Description
The putback for fsstat introduced <sys/avl.h> into sys/vnode.h.
Unfortunately, this header gets included by a variety of other
headers, including <sys/socket.h>; the end result is that code like:

#include <sys/socket.h>

extern int avl_insert(int);

worked before this change but now does not compile:

wesolows@shelter:~/testing $ cc -c avl.c
"avl.c", line 3: identifier redeclared: avl_insert
        current : function(int) returning int
        previous: function(pointer to struct avl_tree {pointer to struct avl_node {..} avl_root, pointer to function(..) returning int avl_compar, unsigned int avl_offset, unsigned long avl_numnodes, unsigned int avl_size}, pointer to void, unsigned int) returning void : "/usr/include/sys/avl.h", line 175


The actual example here is OpenLDAP, which can't reasonably be expected
to rely on this Solaris-specific feature.  Worse still, libavl is
Consolidation Private, so it's not even reasonable to suggest that
OpenLDAP is wrong for defining its own AVL implementation.

Although it would be nice if OpenLDAP used prefixes, the breakage here
would not reasonably be expected.
I've also hit this with Icecast 2.3.1.
Work Around
N/A
Comments
N/A