diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2014-05-24 19:36:39 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-06-03 13:43:52 +0200 |
commit | b6d7e01b4b76cdc72cde36e8cc7c7216fd3cdb6b (patch) | |
tree | a3f4c33c22a65a49bd3a5acc27d33bd16a8766e7 | |
parent | 093285313c7e3d69069ea0d4637f7fee00fb2a2e (diff) | |
download | sssd-b6d7e01b4b76cdc72cde36e8cc7c7216fd3cdb6b.tar.gz sssd-b6d7e01b4b76cdc72cde36e8cc7c7216fd3cdb6b.tar.xz sssd-b6d7e01b4b76cdc72cde36e8cc7c7216fd3cdb6b.zip |
LDAP: Don't use macro _XOPEN_SOURCE for extra features
We defined macro _XOPEN_SOURCE before time.h, because we need function strptime
The problem is with undef after including header time.h
The macro _XOPEN_SOURCE can be defined on some platforms
and undef can cause problems.
We detect all necessary feature macros in configure script
using AC_USE_SYSTEM_EXTENSIONS or AC_GNU_SOURCE.
It is better to include header file config.h
instead of defining macro _XOPEN_SOURCE
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
(cherry picked from commit 80c092f94a7ac24ea00e560201e37ae27cfbf665)
-rw-r--r-- | src/providers/ldap/ldap_auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c index d48a20ecc..8e3c43e4c 100644 --- a/src/providers/ldap/ldap_auth.c +++ b/src/providers/ldap/ldap_auth.c @@ -30,9 +30,9 @@ #define LDAP_TAG_EXOP_MODIFY_PASSWD_NEW ((ber_tag_t) 0x82U) #endif -#define _XOPEN_SOURCE 500 /* for strptime() */ +#include "config.h" + #include <time.h> -#undef _XOPEN_SOURCE #include <errno.h> #include <sys/time.h> #include <strings.h> |