Bug #11150 HP-UX yaSSL/OpenSSL configure/header problem
Submitted: 7 Jun 2005 23:55 Modified: 10 Jun 2005 19:54
Reporter: Kent Boortz Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.0.7-pre OS:HP/UX (HP-UX 11.00)
Assigned to: Sergey Vojtovich CPU Architecture:Any

[7 Jun 2005 23:55] Kent Boortz
There is a call to crypt() in "item_strfunc.cc" that seems to be
enabled if "crypt" exists as a function, i.e. HAVE_CRYPT is
set. But when --openssl or --yassl is defined, then
HAVE_OPENSSL will be defined, and the following code
will be enabled in "my_global.h"

#if defined(HAVE_OPENSSL) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(__OpenBSD__) && !defined(__APPLE__)
#define crypt unistd_crypt
#include <unistd.h>
#undef crypt

This will make the header define "unistd_crypt" instead of "crypt",
causing the compile to fail

Error 328: "item_strfunc.cc", line 1467 # Function 'crypt' has not
been defined yet; cannot call.
      char *tmp=crypt(res->c_ptr(),salt_ptr);

How to repeat:
Compile 5.0.6-pre on HP-UX 11.00 with the configure
flags --with-openssl or --with-yassl

Suggested fix:
Remove the strange test in "my_global.h", and add proper
configure tests. This test should also cover bug#10675, i.e.
it seems that crypt() is sometimes defined in "unistd.h"
instead of "crypt.h".
[8 Jun 2005 16:03] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[10 Jun 2005 7:45] Sergey Vojtovich
Fixed in 4.0.25, 4.1.13, 5.0.8.
ChangeSet 1.2116
[10 Jun 2005 19:54] Paul Dubois
Noted in 4.0.25, 4.1.13, 5.0.8 changelogs.