about summary refs log tree commit homepage
path: root/cmogstored.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-03-17 22:04:39 +0000
committerEric Wong <normalperson@yhbt.net>2012-03-17 22:08:36 +0000
commit54af52697f4dfaec7943db5277d04dcb2f1bf627 (patch)
treee15bbc2ce50aa9fc623ba545d80d4922ba12aa8f /cmogstored.c
parent9356be7590f196a55d2f440fca124299964a1ff1 (diff)
downloadcmogstored-54af52697f4dfaec7943db5277d04dcb2f1bf627.tar.gz
I really hate supporting this hack, especially since the issue
is fixed for newer gcc/gcov users.  However, many systems are on
older gcc and it takes a while for folks to upgrade, so it'd be
nice to encourage more coverage testing.

This isn't needed for newer gcov + gcc in Debian testing/unstable,
but gcov/gcc 4.4.5-8 on Debian squeeze fails to pass argc/argv/envp
to ((constructor)) functions when using gcov.

We'll drop this hack when support for Debian squeeze is terminated
(probably 2014-2015).
Diffstat (limited to 'cmogstored.c')
-rw-r--r--cmogstored.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmogstored.c b/cmogstored.c
index 060d5fe..5473d3d 100644
--- a/cmogstored.c
+++ b/cmogstored.c
@@ -543,8 +543,11 @@ static void run_master(void)
         hash_free(workers);
 }
 
-int main(int argc, char *argv[])
+int main(int argc, char *argv[], char *envp[])
 {
+        /* hack for older gcov + gcc, see nostd/setproctitle.h */
+        spt_init(argc, argv, envp);
+
         setup(argc, argv); /* this daemonizes */
 
         if (worker_processes == 0) {