diff options
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/confdb/confdb.c | 3 | ||||
-rw-r--r-- | src/external/platform.m4 | 3 | ||||
-rw-r--r-- | src/krb5_plugin/sssd_krb5_locator_plugin.c | 4 | ||||
-rw-r--r-- | src/monitor/monitor.c | 1 | ||||
-rw-r--r-- | src/responder/common/responder_common.c | 4 | ||||
-rw-r--r-- | src/sss_client/common.c | 4 | ||||
-rw-r--r-- | src/sss_client/pam_sss.c | 4 | ||||
-rw-r--r-- | src/tools/selinux.c | 1 | ||||
-rw-r--r-- | src/util/crypto/libcrypto/crypto_sha512crypt.c | 1 | ||||
-rw-r--r-- | src/util/crypto/nss/nss_obfuscate.c | 4 | ||||
-rw-r--r-- | src/util/crypto/nss/nss_sha512crypt.c | 3 | ||||
-rw-r--r-- | src/util/debug.c | 3 | ||||
-rw-r--r-- | src/util/server.c | 1 |
14 files changed, 17 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac index b96c42aec..a31f97d20 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,10 @@ AC_INIT([sssd], VERSION_NUMBER, [sssd-devel@lists.fedorahosted.org]) +m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], + [AC_USE_SYSTEM_EXTENSIONS], + [AC_GNU_SOURCE]) + CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" AC_CONFIG_SRCDIR([BUILD.txt]) diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c index 87d33f9bd..3f668dd3d 100644 --- a/src/confdb/confdb.c +++ b/src/confdb/confdb.c @@ -19,10 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define _GNU_SOURCE +#include "config.h" #include <ctype.h> -#include "config.h" #include "util/util.h" #include "confdb/confdb.h" #include "confdb/confdb_private.h" diff --git a/src/external/platform.m4 b/src/external/platform.m4 index 051fe0765..c67e08144 100644 --- a/src/external/platform.m4 +++ b/src/external/platform.m4 @@ -37,8 +37,7 @@ AM_CONDITIONAL([HAVE_DEBIAN], [test x"$osname" = xdebian]) AM_CONDITIONAL([HAVE_GENTOO], [test x"$osname" = xgentoo]) AC_CHECK_MEMBERS([struct ucred.pid, struct ucred.uid, struct ucred.gid], , , - [[#define _GNU_SOURCE - #include <sys/socket.h>]]) + [[#include <sys/socket.h>]]) if test x"$ac_cv_member_struct_ucred_pid" = xyes -a \ x"$ac_cv_member_struct_ucred_uid" = xyes -a \ diff --git a/src/krb5_plugin/sssd_krb5_locator_plugin.c b/src/krb5_plugin/sssd_krb5_locator_plugin.c index a4dc31cb5..d6e90a747 100644 --- a/src/krb5_plugin/sssd_krb5_locator_plugin.c +++ b/src/krb5_plugin/sssd_krb5_locator_plugin.c @@ -17,7 +17,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define _GNU_SOURCE + +#include "config.h" + #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 59ffeb3b4..5559bd9ab 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define _GNU_SOURCE #include <sys/types.h> #include <sys/wait.h> #include <sys/time.h> diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c index 37761ae9a..c8647e01a 100644 --- a/src/responder/common/responder_common.c +++ b/src/responder/common/responder_common.c @@ -19,8 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* for struct ucred */ -#define _GNU_SOURCE +#include "config.h" #include <stdio.h> #include <unistd.h> @@ -33,7 +32,6 @@ #include <sys/time.h> #include <errno.h> #include <popt.h> -#include "config.h" #include "util/util.h" #include "db/sysdb.h" #include "confdb/confdb.h" diff --git a/src/sss_client/common.c b/src/sss_client/common.c index c8a951597..b60330559 100644 --- a/src/sss_client/common.c +++ b/src/sss_client/common.c @@ -23,8 +23,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* for struct ucred */ -#define _GNU_SOURCE +#include "config.h" #include <nss.h> #include <security/pam_modules.h> @@ -43,7 +42,6 @@ #include <libintl.h> #define _(STRING) dgettext (PACKAGE, STRING) -#include "config.h" #include "sss_cli.h" #if HAVE_PTHREAD diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c index 66de232d5..d54c0251f 100644 --- a/src/sss_client/pam_sss.c +++ b/src/sss_client/pam_sss.c @@ -24,10 +24,6 @@ #define PAM_SM_SESSION #define PAM_SM_PASSWORD -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - #include <sys/types.h> #include <unistd.h> #include <stdlib.h> diff --git a/src/tools/selinux.c b/src/tools/selinux.c index 647fc17a5..45672d1bb 100644 --- a/src/tools/selinux.c +++ b/src/tools/selinux.c @@ -21,7 +21,6 @@ #include "config.h" -#define _GNU_SOURCE #include <stdio.h> #ifdef HAVE_SELINUX diff --git a/src/util/crypto/libcrypto/crypto_sha512crypt.c b/src/util/crypto/libcrypto/crypto_sha512crypt.c index 29900cc9c..50734318c 100644 --- a/src/util/crypto/libcrypto/crypto_sha512crypt.c +++ b/src/util/crypto/libcrypto/crypto_sha512crypt.c @@ -10,7 +10,6 @@ /* SHA512-based Unix crypt implementation. Released into the Public Domain by Ulrich Drepper <drepper@redhat.com>. */ -#define _GNU_SOURCE #include <endian.h> #include <errno.h> #include <limits.h> diff --git a/src/util/crypto/nss/nss_obfuscate.c b/src/util/crypto/nss/nss_obfuscate.c index bd8688e65..cbd8984a2 100644 --- a/src/util/crypto/nss/nss_obfuscate.c +++ b/src/util/crypto/nss/nss_obfuscate.c @@ -183,13 +183,13 @@ done: static int nss_encrypt_decrypt_init(TALLOC_CTX *mem_ctx, struct crypto_mech_data *mech_props, - bool encrypt, + bool do_encrypt, struct sss_nss_crypto_ctx *cctx) { CK_ATTRIBUTE_TYPE op; int ret; - op = encrypt ? CKA_ENCRYPT : CKA_DECRYPT; + op = do_encrypt ? CKA_ENCRYPT : CKA_DECRYPT; /* turn the raw key into a key object */ cctx->keyobj = PK11_ImportSymKey(cctx->slot, mech_props->cipher, diff --git a/src/util/crypto/nss/nss_sha512crypt.c b/src/util/crypto/nss/nss_sha512crypt.c index 514e4d9a3..76eb8a635 100644 --- a/src/util/crypto/nss/nss_sha512crypt.c +++ b/src/util/crypto/nss/nss_sha512crypt.c @@ -8,7 +8,8 @@ /* SHA512-based Unix crypt implementation. Released into the Public Domain by Ulrich Drepper <drepper@redhat.com>. */ -#define _GNU_SOURCE +#include "config.h" + #include <endian.h> #include <errno.h> #include <limits.h> diff --git a/src/util/debug.c b/src/util/debug.c index dbd54c1e9..18bfda428 100644 --- a/src/util/debug.c +++ b/src/util/debug.c @@ -19,7 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define _GNU_SOURCE +#include "config.h" + #include <stdio.h> #include <stdarg.h> #include <stdlib.h> diff --git a/src/util/server.c b/src/util/server.c index e12623738..d33c5cb15 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define _GNU_SOURCE #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> |