From 3f11d7820a9d269e0104d77a356eb7149dfc2c53 Mon Sep 17 00:00:00 2001 From: Maximilian Wilhelm Date: Wed, 5 Aug 2009 11:19:34 +0200 Subject: [PATCH] Workaround for broken GCC in Debian Etch * src/storage_conf.c src/internal.h: move previous check in internal.h and add a workaround for a GCC bug in Debian Etch on limit definitions --- src/internal.h | 6 ++++++ src/storage_conf.c | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/internal.h b/src/internal.h index cf7e196713..936cd03020 100644 --- a/src/internal.h +++ b/src/internal.h @@ -73,8 +73,14 @@ #else #define __GNUC_PREREQ(maj,min) 0 #endif + +/* Work around broken limits.h on debian etch */ +#if defined _GCC_LIMITS_H_ && ! defined ULLONG_MAX +#define ULLONG_MAX ULONG_LONG_MAX #endif +#endif /* __GNUC__ */ + /** * ATTRIBUTE_UNUSED: * diff --git a/src/storage_conf.c b/src/storage_conf.c index 075279cc0a..245b2d0cc5 100644 --- a/src/storage_conf.c +++ b/src/storage_conf.c @@ -45,11 +45,6 @@ #define VIR_FROM_THIS VIR_FROM_STORAGE -/* Work around broken limits.h on debian etch */ -#if defined __GNUC__ && defined _GCC_LIMITS_H_ && ! defined ULLONG_MAX -# define ULLONG_MAX ULONG_LONG_MAX -#endif - #define virStorageError(conn, code, fmt...) \ virReportErrorHelper(conn, VIR_FROM_STORAGE, code, __FILE__,\ __FUNCTION__, __LINE__, fmt) -- GitLab