[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH] Fix gnbd/server build warning



gcc -Wall -I/usr/src/ubuntu/mypkgs/rhcluster/cluster/config
-DRELEASE_VERSION=\"DEVEL.1188196448\" -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -I/usr/src/ubuntu/mypkgs/rhcluster/cluster/gnbd-kernel/src
-I/usr/src/ubuntu/mypkgs/rhcluster/cluster/cman/lib -I../include -I../utils
-I/usr/include -c -o gserv.o gserv.c
gserv.c:15:1: warning: "__USE_XOPEN2K" redefined
In file included from /usr/include/unistd.h:26,
                 from gserv.c:13:
/usr/include/features.h:218:1: warning: this is the location of the previous
definition

the patch in attachment will fix the warning and retain backwards compatibility.

Please apply or ACK.

Thanks
Fabio

-- 
I'm going to make him an offer he can't refuse.
Index: gserv.c
===================================================================
RCS file: /cvs/cluster/cluster/gnbd/server/gserv.c,v
retrieving revision 1.6
diff -u -r1.6 gserv.c
--- gserv.c	21 Sep 2006 20:00:01 -0000	1.6
+++ gserv.c	29 Aug 2007 07:24:20 -0000
@@ -12,8 +12,10 @@
 
 #include <unistd.h>
 #include <stdio.h>
+#ifndef __USE_XOPEN2K
 #define __USE_XOPEN2K  /* needed to get posix_memalign */
-#include <stdlib.h>  
+#endif
+#include <stdlib.h> 
 #include <string.h>
 #include <errno.h>
 #include <syslog.h>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]