Having an issue with cyrus.c on windows.
I keep hitting:
openldap/libraries/libldap/cyrus.c: In function 'ldap_int_sasl_bind': openldap/libraries/libldap/cyrus.c:392:19: error: 'HOST_NAME_MAX' undeclared (first use in this function); did you mean 'FILENAME_MAX'? char my_hostname[HOST_NAME_MAX + 1]; ^~~~~~~~~~~~~ FILENAME_MAX
Yet this code compiles just fine:
$ cat test.c #include <limits.h>
void main() { char my_hostname[HOST_NAME_MAX + 1]; }
In cyrus.c, we have:
#ifdef HAVE_CYRUS_SASL ... #ifdef HAVE_LIMITS_H #include <limits.h> #endif ...
in config.log, it has:
#define HAVE_CYRUS_SASL 1
and
#define HAVE_LIMITS_H 1
So the limits.h include file should be included.
Any thoughts?
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
--On Monday, July 22, 2019 4:33 PM -0700 Quanah Gibson-Mount quanah@symas.com wrote:
So the limits.h include file should be included.
Any thoughts?
Ok, it's using a different include path, and HOST_NAME_MAX is definitely not in there.
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
--On Monday, July 22, 2019 5:55 PM -0700 Quanah Gibson-Mount quanah@symas.com wrote:
--On Monday, July 22, 2019 4:33 PM -0700 Quanah Gibson-Mount quanah@symas.com wrote:
So the limits.h include file should be included.
Any thoughts?
Ok, it's using a different include path, and HOST_NAME_MAX is definitely not in there.
Ok, general issue is that the patch for ITS#7585 is Linux specific, but the patch made no allowance for Windows. I'm testing an ugly patch atm just to see if it'll allow Windows compilation.
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
Quanah Gibson-Mount wrote:
Having an issue with cyrus.c on windows.
I keep hitting:
openldap/libraries/libldap/cyrus.c: In function 'ldap_int_sasl_bind': openldap/libraries/libldap/cyrus.c:392:19: error: 'HOST_NAME_MAX' undeclared (first use in this function); did you mean 'FILENAME_MAX'? char my_hostname[HOST_NAME_MAX + 1]; ^~~~~~~~~~~~~ FILENAME_MAX
Yet this code compiles just fine:
$ cat test.c #include <limits.h>
void main() { char my_hostname[HOST_NAME_MAX + 1]; }
In cyrus.c, we have:
#ifdef HAVE_CYRUS_SASL ... #ifdef HAVE_LIMITS_H #include <limits.h> #endif ...
in config.log, it has:
#define HAVE_CYRUS_SASL 1
and
#define HAVE_LIMITS_H 1
So the limits.h include file should be included.
And are they defined in portable.h?