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

[Xen-devel] [PATCH] libxl: fix build for gcc prior to 4.3


  • To: "xen-devel" <xen-devel@xxxxxxxxxxxxx>
  • From: "Jan Beulich" <JBeulich@xxxxxxxx>
  • Date: Wed, 08 Aug 2012 11:25:49 +0100
  • Delivery-date: Wed, 08 Aug 2012 10:26:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

So far all we (explicitly) require is gcc 3.4 or better, so we
shouldn't be unconditionally using features supported only by much
newer versions.

Short of a proper replacement, use the "deprecated" attribute instead:
It also produces a warning (thus causing the build to fail due to
-Werror), and is at least getting close to the intention here.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -55,8 +55,12 @@
 #ifdef LIBXL_H
 # error libxl.h should be included via libxl_internal.h, not separately
 #endif
-#define LIBXL_EXTERNAL_CALLERS_ONLY \
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+# define LIBXL_EXTERNAL_CALLERS_ONLY \
     __attribute__((warning("may not be called from within libxl")))
+#else
+# define LIBXL_EXTERNAL_CALLERS_ONLY __attribute__((__deprecated__))
+#endif
 
 #include "libxl.h"
 #include "_paths.h"



Attachment: libxl-build-gcc-pre-4.3.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.