Bug 799693

Summary: guestfs.h failes to compile with c++ compiler
Product: [Community] Virtualization Tools Reporter: Marcin Gibula <m.gibula>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 799695 (view as bug list) Environment:
Last Closed: 2012-03-04 11:59:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 799695    
Attachments:
Description Flags
Proposed patch. none

Description Marcin Gibula 2012-03-04 11:28:40 UTC
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.

Comment 1 Richard W.M. Jones 2012-03-04 11:50:55 UTC
Thanks, the patch looks good and I will push it shortly.

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

Will be fixed in 1.17.11 / 1.16.8.