Comment 2 for bug 658739

Revision history for this message
In , Rich (rich-redhat-bugs) wrote :

Description of problem:
When compiling a C++ program with unicap.h, the following error occurs:

/usr/include/unicap/unicap.h:218:34: error: expected unqualified-id before ‘private’
/usr/include/unicap/unicap.h:218:34: error: expected ‘;’ before ‘private’

Upon further inspection, line 218 of unicap.h contains the following:
   unicap_data_buffer_private_t *private;

The "private" C++ keyword is being used here as a member name inside of a struct, which is preventing g++ from using unicap.h

Version-Release number of selected component (if applicable):
libunicap-0.9.12-1.fc14.x86_64
libunicap-devel-0.9.12-1.fc14.x86_64

How reproducible:
Compile a C++ program with unicap.h included.

Steps to Reproduce:
1. Create file "unicaptest.cpp" with trivial program:
  #include "unicap.h"
  int main(){}
2. Run g++ `pkg-config --cflags libunicap` -o unicaptest unicaptest.cpp
3. View error.

Actual results:
Program fails to compile, with above error

Expected results:
Program compiles

Additional info:
Test case compiles when the file extension is changed to .c and gcc is used.