From afee6e6fb82cdfe2f8c2bb4402e41598d1eb7c07 Mon Sep 17 00:00:00 2001 From: yoe Date: Fri, 26 Oct 2007 20:17:54 +0000 Subject: [PATCH] r299: Make -Werror work again --- configure.ac | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 3ebb983..350166a 100644 --- a/configure.ac +++ b/configure.ac @@ -109,8 +109,13 @@ AC_TRY_COMPILE([#define u32 int #define __be32 int #define __be64 int #include "nbd.h" +#ifdef __GNUC__ +#define UNUSED __attribute__((__unused__)) +#else +#define UNUSED +#endif ], -[int foo=NBD_CMD_DISC], +[int UNUSED foo=NBD_CMD_DISC], [AC_DEFINE(NBD_H_LOCAL, 1, Set to 1 if a (2.6) nbd.h can be found in the current directory) NBD_H='"nbd.h"'], AC_TRY_COMPILE([#define u32 int @@ -118,13 +123,23 @@ AC_TRY_COMPILE([#define u32 int #define __be32 int #define __be64 int #include +#ifdef __GNUC__ +#define UNUSED __attribute__((__unused__)) +#else +#define UNUSED +#endif ], -[int foo=NBD_CMD_DISC], +[int UNUSED foo=NBD_CMD_DISC], [AC_DEFINE(NBD_H_LINUX, 1, Set to 1 if a (2.6) nbd.h can be found in the linux directory in the search path) NBD_H=''], AC_TRY_COMPILE([#include +#ifdef __GNUC__ +#define UNUSED __attribute__((__unused__)) +#else +#define UNUSED +#endif ], - [int foo=NBD_CMD_DISC], + [int UNUSED foo=NBD_CMD_DISC], [AC_DEFINE(NBD_H_LINUX, 1, Set to 1 if a (2.6) nbd.h can be found in the linux directory in the search path) NBD_H=''], AC_MSG_ERROR(Could not find an nbd.h from 2.6 or above.) -- 1.7.10.4