summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2015-06-04 13:00:42 -0400
committerRay Strode <rstrode@redhat.com>2018-04-03 14:16:17 -0400
commit539bf5dcca489534f42798a4500aca4b1a8ec8d0 (patch)
tree91af443b71125b8b26eb8a9d763f3024f0308b8c
parentfef4b4dea0ebc6cb99a148d8d60badf68a29a6b8 (diff)
downloadpolkit-539bf5dcca489534f42798a4500aca4b1a8ec8d0.tar.gz
build: Use AC_USE_SYSTEM_EXTENSIONS
This ensures that we get all of the extensions consistently, rather than having just a few files `#define _GNU_SOURCE`.
-rw-r--r--configure.ac1
-rw-r--r--src/examples/frobnicate.c3
-rw-r--r--src/polkitagent/polkitagenthelperprivate.h1
-rw-r--r--src/programs/pkexec.c2
4 files changed, 3 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 4af973b..8112171 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,6 +23,7 @@ AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
+AC_USE_SYSTEM_EXTENSIONS
AC_ISC_POSIX
AC_PROG_CC
AC_HEADER_STDC
diff --git a/src/examples/frobnicate.c b/src/examples/frobnicate.c
index 7ca6c46..29e0cbf 100644
--- a/src/examples/frobnicate.c
+++ b/src/examples/frobnicate.c
@@ -19,7 +19,8 @@
* Author: David Zeuthen <davidz@redhat.com>
*/
-#define _GNU_SOURCE
+#include "config.h"
+
#include <glib.h>
#include <unistd.h>
#include <stdlib.h>
diff --git a/src/polkitagent/polkitagenthelperprivate.h b/src/polkitagent/polkitagenthelperprivate.h
index 547fdcc..c5145b5 100644
--- a/src/polkitagent/polkitagenthelperprivate.h
+++ b/src/polkitagent/polkitagenthelperprivate.h
@@ -22,7 +22,6 @@
#ifndef __POLKIT_AGENT_HELPER_PRIVATE_H
#define __POLKIT_AGENT_HELPER_PRIVATE_H
-#define _GNU_SOURCE
#include <polkit/polkit.h>
/* Development aid: define PAH_DEBUG to get debugging output. Do _NOT_
diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c
index 32c204d..7698c5c 100644
--- a/src/programs/pkexec.c
+++ b/src/programs/pkexec.c
@@ -23,8 +23,6 @@
# include "config.h"
#endif
-#define _GNU_SOURCE
-
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>