On Sep 20, 2006, at 6:13 PM, R. Tyler Ballance wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I still think this falls under the same thread, so here it goes:
In file included from /usr/include/rpm/rpmdb.h:13,
from scanner.c:21:
/usr/include/rpm/db.h:1731: error: syntax error before "u_long"
/usr/include/rpm/db.h:1734: error: 'close' redeclared as different
kind of symbol
/usr/include/unistd.h:305: error: previous declaration of 'close'
was here
/usr/include/rpm/db.h:1734: error: 'close' redeclared as different
kind of symbol
/usr/include/unistd.h:305: error: previous declaration of 'close'
was here
/usr/include/rpm/db.h:1743: error: 'open' redeclared as different
kind of symbol
/usr/include/fcntl.h:72: error: previous declaration of 'open' was
here
/usr/include/rpm/db.h:1743: error: 'open' redeclared as different
kind of symbol
/usr/include/fcntl.h:72: error: previous declaration of 'open' was
here
/usr/include/rpm/db.h:1744: error: 'remove' redeclared as different
kind of symbol
/usr/include/stdio.h:154: error: previous declaration of 'remove'
was here
/usr/include/rpm/db.h:1744: error: 'remove' redeclared as different
kind of symbol
/usr/include/stdio.h:154: error: previous declaration of 'remove'
was here
/usr/include/rpm/db.h:1895: error: syntax error before '}' token
/usr/include/rpm/db.h:2078: error: syntax error before "u_long"
Why in the world does the db.h file (included from rpmdb.h) attempt
to use the same symbols as standard C...?
Here's the comment in db.h:
* !!!
* We also provide the standard u_int, u_long etc., if they're not
provided
* by the system.
This is probably an ordering issue wrto your includes, or perhaps you
need -D_GNU_SOURCE
or other defines added when compiling.
For building inside the rpm tree, I do
#include "system.h"
#include <rpmlib.h>
#include <rpmdb.h>
adding -I../lib -I../rpmdb and other include dirs.
Putside the rpm tree, add -I/usr/include/rpm and replace
#include "system.h"
with the usual standard includes.
73 de Jeff
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list