首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

suse11.4 装配memcache 报错array subscript is above array bounds 解决

2012-07-15 
suse11.4 安装memcache 报错array subscript is above array bounds 解决suse11.4 安装memcache 报错:?mak

suse11.4 安装memcache 报错array subscript is above array bounds 解决

suse11.4 安装memcache 报错:

?

make error "array subscript is above array bounds"?

?

这是memcache 在suse11.4 上的一个bug.因此需要打一个补丁去解决

?

applying a found patch (https://svn.erp5.org/repos/public/erp5/trunk/patches/memcached-1.4-fix-array-subscript-is-above-array-bounds.patch) seems to remedy the problem,cat fix-array-subscript-is-above-array-bounds.patch# zypper si memcached# cat /usr/src/packages/SOURCES/memcached-1.4.5.dif--- memcached.c.orig    2011-07-12 00:37:00.000000000 -0700+++ memcached.c 2011-07-17 20:14:53.000000000 -0700@@ -2360,15 +2360,18 @@ inline static void process_stats_detail(conn *c, const char *command) {     assert(c != NULL);-    if (strcmp(command, "on") == 0) {+    char on[] = "on";+    char off[] = "off";+    char dump[] = "dump";+    if (strcmp(command, on) == 0) {         settings.detail_enabled = 1;         out_string(c, "OK");     }-    else if (strcmp(command, "off") == 0) {+    else if (strcmp(command, off) == 0) {         settings.detail_enabled = 0;         out_string(c, "OK");     }-    else if (strcmp(command, "dump") == 0) {+    else if (strcmp(command, dump) == 0) {         int len;         char *stats = stats_prefix_dump(&len);         write_and_free(c, stats, len);cd /usr/local/src/memcached*/make cleanpatch -p0 < ../fix-array-subscript-is-above-array-bounds.patchpatching file memcached.cHunk #1 succeeded at 2356 (offset -4 lines)../configuremake...make[2]: Leaving directory `/usr/local/src/memcached-1.4.7'make[1]: Leaving directory `/usr/local/src/memcached-1.4.7'>make installls -al `which memcached`-rwxr-xr-x 1 root root 93136 Aug 21 13:34 /usr/local/bin/memcached

?


?

热点排行