Red Hat Bugzilla – Bug 799695
guestfs.h fails to compile with c++ compiler
Last modified: 2012-06-20 03:00:59 EDT
+++ This bug was initially created as a clone of Bug #799693 +++ Created attachment 567384 [details] Proposed patch. Description of problem: Function guestfs_mkdtemp uses c++ keyword "template" as a parameter name. In result, attempt to use guestfs.h header in c++ program results in compile error. Version-Release number of selected component (if applicable): 1.16.7 How reproducible: #include <guestfs.h> int main() { } Steps to Reproduce: 1. Try to compile above with g++ Actual results: /usr/include/guestfs.h:1401:76: error: expected ‘,’ or ‘...’ before ‘template’ Expected results: No error. Additional info: Proposed patch included. --- Additional comment from rjones@redhat.com on 2012-03-04 06:50:55 EST --- Thanks, the patch looks good and I will push it shortly.
Upstream commit: 49611f121fa10d1497e46ab9aa6a7448cb89cd86
//guestfs.c #include <guestfs.h> int main() { } libguestfs-1.16.5-1.el6(devel package) [root@dhcp-93-131 tmp]# g++ guestfs.c -o guestfs In file included from guestfs.c:1: /usr/include/guestfs.h:1401: error: expected ‘,’ or ‘...’ before ‘template’ libguestfs-1.16.12-1.el6(devel package) [root@dhcp-93-131 tmp]# g++ guestfs.c -o guestfs no any error output,
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No Documentation needed
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2012-0774.html