On Sat, Feb 21, 2009 at 03:54:46PM -0500, Justin Bronder wrote: > I get the following warning when compiling 3.1.1 and 3.1.2.
3.0 has also the same problem but warnings (-Wall) weren't enabled when compiling libmetrics hence the message wasn't visible by default. > Following the way > that __USE_GNU is defined in libmetrics/linux/metrics.c, the attached patch > removes this warning. as explained in feature_test_macros(7), using "__USE_GNU" or any other similar macros is forbidden, hence conditionally defining _GNU_SOURCE is a better solution (implemented in trunk and most likely to be part of 3.1.3) and as shown in the following inlined patch. Carlo --- Index: libmetrics/linux/metrics.c =================================================================== --- libmetrics/linux/metrics.c (revision 1950) +++ libmetrics/linux/metrics.c (revision 1951) @@ -1,8 +1,9 @@ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + #include <stdio.h> #include <stdlib.h> -#ifndef __USE_GNU -#define __USE_GNU -#endif #include <string.h> #include <time.h> #include <unistd.h> ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers