Bug 799695 - guestfs.h fails to compile with c++ compiler
Summary: guestfs.h fails to compile with c++ compiler
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.3
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 799693
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-04 11:55 UTC by Richard W.M. Jones
Modified: 2012-06-20 07:00 UTC (History)
7 users (show)

Fixed In Version: libguestfs-1.16.8-1.el6
Doc Type: Bug Fix
Doc Text:
No Documentation needed
Clone Of: 799693
Environment:
Last Closed: 2012-06-20 07:00:59 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0774 0 normal SHIPPED_LIVE Low: libguestfs security, bug fix, and enhancement update 2012-06-19 19:29:50 UTC

Description Richard W.M. Jones 2012-03-04 11:55:58 UTC
+++ 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 on 2012-03-04 06:50:55 EST ---

Thanks, the patch looks good and I will push it shortly.

Comment 1 Richard W.M. Jones 2012-03-04 11:59:57 UTC
Upstream commit:
49611f121fa10d1497e46ab9aa6a7448cb89cd86

Comment 3 Mohua Li 2012-03-26 07:23:18 UTC
//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,

Comment 4 Richard W.M. Jones 2012-04-26 12:22:36 UTC
    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

Comment 6 errata-xmlrpc 2012-06-20 07:00:59 UTC
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


Note You need to log in before you can comment on or make changes to this bug.