Bug 799695 - guestfs.h fails to compile with c++ compiler
guestfs.h fails to compile with c++ compiler
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs (Show other bugs)
Unspecified Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
Depends On: 799693
  Show dependency treegraph
Reported: 2012-03-04 06:55 EST by Richard W.M. Jones
Modified: 2012-06-20 03:00 EDT (History)
7 users (show)

See Also:
Fixed In Version: libguestfs-1.16.8-1.el6
Doc Type: Bug Fix
Doc Text:
No Documentation needed
Story Points: ---
Clone Of: 799693
Last Closed: 2012-06-20 03:00:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2012-03-04 06:55:58 EST
+++ 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):

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.
Comment 1 Richard W.M. Jones 2012-03-04 06:59:57 EST
Upstream commit:
Comment 3 Mohua Li 2012-03-26 03:23:18 EDT

#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 08:22:36 EDT
    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 03:00:59 EDT
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.


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