diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2011-03-12 08:34:52 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2011-03-12 08:34:52 +0000 |
commit | dab5d66ad94e6937fdbe91bb5523b647dfe90a85 (patch) | |
tree | cc4d0a7d16fb0024732938416bcbbf2e325fc64d | |
parent | bfc6e33237ce8470c343d8b6d3761be6af5733c4 (diff) |
put all HOST_NAME_MAX fallbacks in common.h and fall back to _POSIX_HOST_NAME_MAX (thanks Peter Bray)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1390 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | nslcd/common.h | 4 | ||||
-rw-r--r-- | nslcd/pam.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/nslcd/common.h b/nslcd/common.h index 6399506..9247911 100644 --- a/nslcd/common.h +++ b/nslcd/common.h @@ -105,7 +105,11 @@ int update_lastchange(MYLDAP_SESSION *session,const char *userdn); /* fallback definition of HOST_NAME_MAX */ #ifndef HOST_NAME_MAX +#ifdef _POSIX_HOST_NAME_MAX +#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX +#else #define HOST_NAME_MAX 255 +#endif /* _POSIX_HOST_NAME_MAX */ #endif /* not HOST_NAME_MAX */ /* these are the functions for initialising the database specific diff --git a/nslcd/pam.c b/nslcd/pam.c index 399d599..c0cefb9 100644 --- a/nslcd/pam.c +++ b/nslcd/pam.c @@ -38,10 +38,6 @@ #include "common/dict.h" #include "common/expr.h" -#ifndef HOST_NAME_MAX -#define HOST_NAME_MAX 255 -#endif /* not HOST_NAME_MAX */ - /* set up a connection and try to bind with the specified DN and password, returns an LDAP result code */ static int try_bind(const char *userdn,const char *password) |