While compiling some GNU C++ code against the include file /usr/include/ufs/ufs/ufsmount.h, we discovered the ufs_args structure has a member variable named 'export'. G++ chokes with the following error: /usr/include/ufs/ufs/ufsmount.h:43: error: expected unqualified-id before 'export' The reason is that the term 'export' is a reserved, but presently unused keyword in the C++ language. To solve our problem, we've copied the header locally to our project folder, and renamed the reference. But if possible, I was hoping this could be folded back into the main tree. I recognize this could present a breaking change for any projects that link against libufs -- but sooner or later this change will need to be accepted or someone is going to have to convince the folks at GNU/C++ to add a compiler directive to ignore the 'export' keyword (fyi -- I checked, but so far this looks like a no go). FYI -- the folks at the openssl project encountered had a similar problem and eventually they were forced to just rename the member variable. How-To-Repeat: Create my.cpp, paste in #include <sys/param.h> #include <sys/mount.h> #include <ufs/ufs/ufsmount.h> #include <ufs/ufs/dinode.h> #include <ufs/ffs/fs.h> #include <libufs.h> g++ -c my.cpp ~ ~
WHOOPS - inverted the filenames for our patch. Here is the correct patch --- /usr/include/ufs/ufs/ufsmount.h 2012-02-29 12:32:28.000000000 -0500 +++ ufsmount.h 2012-02-29 13:07:08.000000000 -0500 @@ -40,7 +40,7 @@ */ struct ufs_args { char *fspec; /* block special device to mount */ - struct oexport_args export; /* network export information */ + struct oexport_args export_; /* network export information */ }; #ifdef _KERNEL
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainer(s).
Responsible Changed From-To: freebsd-fs->kib Grab. The supplied patch is obviously wrong, or rather incomplete. The in-kernel uses of the export member must be corrected.
Responsible Changed From-To: kib->freebsd-bugs Release the PR.
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>