diff options
author | Khem Raj <raj.khem@gmail.com> | 2010-10-26 14:02:03 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2010-10-26 16:43:07 -0700 |
commit | b3125ddae3c5466f0f73ad1a68ec00825204b2ee (patch) | |
tree | ca08d512e8f4614f7948ddc796c1594ccc4174fe /recipes | |
parent | 0e49c494286d5dff3965f45593104c9544edbff0 (diff) | |
download | openembedded-b3125ddae3c5466f0f73ad1a68ec00825204b2ee.tar.gz |
cluster-glue_1.0.5.bb: Fix compilation w.r.t. using constant cast using gcc 4.5
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/linux-ha/cluster-glue/fix-const-cast.patch | 99 | ||||
-rw-r--r-- | recipes/linux-ha/cluster-glue_1.0.5.bb | 2 |
2 files changed, 97 insertions, 4 deletions
diff --git a/recipes/linux-ha/cluster-glue/fix-const-cast.patch b/recipes/linux-ha/cluster-glue/fix-const-cast.patch index 6532caa100..b913db2a16 100644 --- a/recipes/linux-ha/cluster-glue/fix-const-cast.patch +++ b/recipes/linux-ha/cluster-glue/fix-const-cast.patch @@ -2,6 +2,7 @@ This patch gets rid of new warning introduced with gcc 4.5 Warning is explained here http://gcc.gnu.org/viewcvs/trunk/gcc/doc/invoke.texi?r1=148037&r2=148053&diff_format=h +-Khem Index: Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/apcsmart.c =================================================================== @@ -15,13 +16,105 @@ Index: Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/apcsmart.c static char ** apcsmart_hostlist(StonithPlugin * s) { -@@ -719,7 +718,8 @@ apcsmart_hostlist(StonithPlugin * s) +@@ -719,7 +718,7 @@ apcsmart_hostlist(StonithPlugin * s) } ERRIFNOTCONFIGED(s,NULL); - return OurImports->CopyHostList((const char **)ad->hostlist); -+/* return OurImports->CopyHostList((const char **)(ad->hostlist));*/ -+ return OurImports->CopyHostList((__extension__(union {char ** a; const char** b;})(ad->hostlist)).b); ++ return OurImports->CopyHostList(CONST_CAST(ad->hostlist)); } static gboolean +Index: Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/external.c +=================================================================== +--- Reusable-Cluster-Components-glue-1.0.5.orig/lib/plugins/stonith/external.c ++++ Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/external.c +@@ -539,8 +539,7 @@ external_get_confignames(StonithPlugin* + free(files); + sd->confignames[dircount] = NULL; + } +- +- return (const char **)sd->confignames; ++ return CONST_CAST(sd->confignames); + } + + /* +Index: Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/rhcs.c +=================================================================== +--- Reusable-Cluster-Components-glue-1.0.5.orig/lib/plugins/stonith/rhcs.c ++++ Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/rhcs.c +@@ -702,8 +702,7 @@ rhcs_get_confignames(StonithPlugin* p) + free(files); + sd->confignames[dircount] = NULL; + } +- +- return (const char **)sd->confignames; ++ return CONST_CAST(sd->confignames); + } + + /* +Index: Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/meatware.c +=================================================================== +--- Reusable-Cluster-Components-glue-1.0.5.orig/lib/plugins/stonith/meatware.c ++++ Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/meatware.c +@@ -136,7 +136,7 @@ meatware_hostlist(StonithPlugin *s) + return(NULL); + } + +- return OurImports->CopyHostList((const char **)nd->hostlist); ++ return OurImports->CopyHostList(CONST_CAST(nd->hostlist)); + } + + /* +Index: Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/null.c +=================================================================== +--- Reusable-Cluster-Components-glue-1.0.5.orig/lib/plugins/stonith/null.c ++++ Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/null.c +@@ -126,7 +126,7 @@ null_hostlist(StonithPlugin *s) + struct pluginDevice* nd = (struct pluginDevice*)s; + + ERRIFWRONGDEV(s, NULL); +- return OurImports->CopyHostList((const char**)nd->hostlist); ++ return OurImports->CopyHostList(CONST_CAST(nd->hostlist)); + } + + +Index: Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/rcd_serial.c +=================================================================== +--- Reusable-Cluster-Components-glue-1.0.5.orig/lib/plugins/stonith/rcd_serial.c ++++ Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/rcd_serial.c +@@ -347,7 +347,7 @@ rcd_serial_hostlist(StonithPlugin *s) + return(NULL); + } + +- return OurImports->CopyHostList((const char **)rcd->hostlist); ++ return OurImports->CopyHostList(CONST_CAST(rcd->hostlist)); + } + + /* +Index: Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/ssh.c +=================================================================== +--- Reusable-Cluster-Components-glue-1.0.5.orig/lib/plugins/stonith/ssh.c ++++ Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/ssh.c +@@ -161,7 +161,7 @@ ssh_hostlist(StonithPlugin *s) + return(NULL); + } + +- return OurImports->CopyHostList((const char **)sd->hostlist); ++ return OurImports->CopyHostList(CONST_CAST(sd->hostlist)); + } + + +Index: Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/stonith_plugin_common.h +=================================================================== +--- Reusable-Cluster-Components-glue-1.0.5.orig/lib/plugins/stonith/stonith_plugin_common.h ++++ Reusable-Cluster-Components-glue-1.0.5/lib/plugins/stonith/stonith_plugin_common.h +@@ -123,5 +123,8 @@ + return; \ + } + ++#define CONST_CAST(s) \ ++ (__extension__(union {char ** a; const char** b;})(s)).b ++ + #endif + diff --git a/recipes/linux-ha/cluster-glue_1.0.5.bb b/recipes/linux-ha/cluster-glue_1.0.5.bb index 7207a6398e..b4d5c59065 100644 --- a/recipes/linux-ha/cluster-glue_1.0.5.bb +++ b/recipes/linux-ha/cluster-glue_1.0.5.bb @@ -6,7 +6,7 @@ is not the cluster messaging layer (Heartbeat), nor the cluster resource manager LICENSE = "GPL" DEPENDS = "libxml2 libtool glib-2.0 bzip2 util-linux-ng" -PR = "r2" +PR = "r3" SRC_URI = " \ http://hg.linux-ha.org/glue/archive/glue-${PV}.tar.bz2;name=tar \ |