about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-18 07:17:41 +0000
committerEric Wong <e@80x24.org>2016-07-18 07:20:13 +0000
commit026d9f4d635ac360f9d349ffcb50a8252719730e (patch)
treeca626ef91094315ce785535b40432dbfe9efa092
parent53030c527eaac6ea2d6acbf501569d575fef9d41 (diff)
downloadcmogstored-gl-env.tar.gz
This avoids warnings on my GNU system while still working on
FreeBSD.
-rw-r--r--configure.ac2
-rw-r--r--iostat_process.c1
-rw-r--r--m4/gnulib-cache.m43
3 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 1a94fa4..22f6d9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,8 @@ gl_WARN_ADD([-Werror=pointer-arith])
 gl_WARN_ADD([-Werror-implicit-function-declaration])
 gl_WARN_ADD([-Werror=declaration-after-statement]) dnl I hate C99 for this :P
 gl_WARN_ADD([-ggdb3],[CFLAGS])
+gl_ENVIRON
+gl_UNISTD_MODULE_INDICATOR([environ])
 AX_PTHREAD(true)
 CM_GCC_ATOMICS(true)
 AC_SYS_LARGEFILE
diff --git a/iostat_process.c b/iostat_process.c
index 65acd22..9f98077 100644
--- a/iostat_process.c
+++ b/iostat_process.c
@@ -8,7 +8,6 @@
  * regardless of the number of mog_svc objects we have.
  */
 #include "cmogstored.h"
-extern char **environ;
 
 static pid_t iostat_pid;
 static time_t iostat_last_fail;
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index f50dae3..9cdd8fb 100644
--- a/m4/gnulib-cache.m4
+++ b/m4/gnulib-cache.m4
@@ -27,7 +27,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --avoid=accept --avoid=accept4 --avoid=alloca --avoid=fstatat --avoid=getcwd --avoid=ioctl --avoid=openat --avoid=read --avoid=sleep --avoid=write --no-conditional-dependencies --no-libtool --macro-prefix=gl argp base64 canonicalize crypto/gc-md5 crypto/gc-sha1 dprintf error findprog gettime git-version-gen hash mempcpy minmax mountlist nonblocking nproc pipe2 progname random_r verify warnings xvasprintf
+#   gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --avoid=accept --avoid=accept4 --avoid=alloca --avoid=fstatat --avoid=getcwd --avoid=ioctl --avoid=openat --avoid=read --avoid=sleep --avoid=write --no-conditional-dependencies --no-libtool --macro-prefix=gl argp base64 canonicalize crypto/gc-md5 crypto/gc-sha1 dprintf environ error findprog gettime git-version-gen hash mempcpy minmax mountlist nonblocking nproc pipe2 progname random_r verify warnings xvasprintf
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
@@ -38,6 +38,7 @@ gl_MODULES([
   crypto/gc-md5
   crypto/gc-sha1
   dprintf
+  environ
   error
   findprog
   gettime