'Error in file /usr/include/ntirpc/rpc/xdr.h when compiling a program with rpc

I have to compile a c and c++ library with rpc for accessing meeasurement devices, that uses the standrd VXI11, see vxi11-library.

OS: opensuse tumbleweed Compiler: gcc 12.1.0

After adding the include path -I/usr/include/ntirpc the program at least find the include path (rpc/rpc.h, obviously has been shifted around).

I had to change the name of some functions, but one error remained:

g++ -g -I/usr/include/ntirpc -c vxi11_cmd.cc -o vxi11_cmd.o
In file included from /usr/include/ntirpc/rpc/rpc.h:47,
                 from vxi11_user.h:31,
                 from vxi11_cmd.cc:25:
/usr/include/ntirpc/rpc/xdr.h:136:18: error: declaration of ‘vio_type xdr_vio::vio_type’ changes meaning of ‘vio_type’ [-fpermissive]
  136 |         vio_type vio_type;      /* type of buffer */

/usr/include/ntirpc/rpc/xdr.h:126:3: note: ‘vio_type’ declared here as ‘typedef enum vio_type vio_type’ 126 | } vio_type;

Anybode can help me, fixing thies error?

Thanks, Johannes

rpc


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source