Red Hat Bugzilla – Bug 90067
Conflict of prototypes in include files.
Last modified: 2007-04-18 12:53:25 EDT
Description of problem: The files /usr/include/unistd.h and /usr/include/openssl/des.h both define the C++ function crypt(). In both
files, the function itself has the same prototype. But the definitions throw
Version-Release number of selected component (if applicable):
How reproducible: completely
Steps to Reproduce:
1. Download the program postal version 0.62 from http://www.coker.com.au/postal/.
2. Go through the usual mantra of gunzip, tar -x, configure, make
The make terminates with the following error:
In file included from tcp.cpp:6:
/usr/include/unistd.h:964: declaration of `char* crypt(const char*, const
char*) throw ()' throws different exceptions
/usr/include/openssl/des.h:193: than previous declaration `char* crypt(const
char*, const char*)'
Expected results: That the make should finish successfully.
Just for reference, the postal package is a mail server stress testing tool. It appears that the program first includes <openssl/crypto.h> (which includes
<openssl/des.h> at some point.), and then it includes <unistd.h>.
The relevant line in <unistd.h> is line 964:
extern char *crypt (__const char *__key, __const char *__salt) __THROW;
The relevant line in <openssl/des.h> is line 193:
char *crypt(const char *buf,const char *salt);
Just to be clear, I'm not asking for help with the postal program. My
concern is what happens when someone includes both <openssl/des.h> and
<unistd.h>. As far as I know, there is no restriction on not including both
of them at the same time. I am merely using the postal program to illustrate
the problem since that is where I found it.
I'm sorry if I picked the wrong package in the Bugzilla tool. It would only
let me pick one package, and this issue involves filess from two packages.
Please let me know if there is any other information that I can provide.
This seems to be fixed in openssl-0.9.7