LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1390|回复: 7

还有人在为zhcon头疼吗?

[复制链接]
发表于 2005-12-18 18:52:20 | 显示全部楼层 |阅读模式
已经有人写了一个补丁,其实就是两行代码,可以自己手工修改一下。基本没有问题了。就是在运行的时侯会有一行报错,但是不影响使用。

补丁内容如下:

--- /usr/include/linux/wait.h2005-08-16 17:51:20.000000000 +0800
+++ /tmp/wait.h2005-08-16 17:50:57.000000000 +0800
@@ -373,7 +373,7 @@
static inline int wait_on_bit(void *word, int bit,
int (*action)(void *), unsigned mode)
{
-if (!test_bit(bit, word))
+if (!test_bit(bit, (const volatile long unsigned int *)word))
return 0;
return out_of_line_wait_on_bit(word, bit, action, mode);
}
@@ -397,7 +397,7 @@
static inline int wait_on_bit_lock(void *word, int bit,
int (*action)(void *), unsigned mode)
{
-if (!test_and_set_bit(bit, word))
+if (!test_and_set_bit(bit, (volatile long unsigned int *)word))
return 0;
return out_of_line_wait_on_bit_lock(word, bit, action, mode);
}
发表于 2005-12-18 19:06:51 | 显示全部楼层
转载别人作品时,请注明出处,以显示对别人的尊重
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-18 19:36:10 | 显示全部楼层
可惜,不知道作者,只有个链接http://bugs.gentoo.org/attachment.cgi?id=66062
回复 支持 反对

使用道具 举报

发表于 2005-12-20 12:46:57 | 显示全部楼层
Post by slinger
已经有人写了一个补丁,其实就是两行代码,可以自己手工修改一下。基本没有问题了。就是在运行的时侯会有一行报错,但是不影响使用。

补丁内容如下:

--- /usr/include/linux/wait.h2005-08-16 17:51:20.000000000 +0800
+++ /tmp/wait.h2005-08-16 17:50:57.000000000 +0800
@@ -373,7 +373,7 @@
static inline int wait_on_bit(void *word, int bit,
int (*action)(void *), unsigned mode)
{
-if (!test_bit(bit, word))
+if (!test_bit(bit, (const volatile long unsigned int *)word))
return 0;
return out_of_line_wait_on_bit(word, bit, action, mode);
}
@@ -397,7 +397,7 @@
static inline int wait_on_bit_lock(void *word, int bit,
int (*action)(void *), unsigned mode)
{
-if (!test_and_set_bit(bit, word))
+if (!test_and_set_bit(bit, (volatile long unsigned int *)word))
return 0;
return out_of_line_wait_on_bit_lock(word, bit, action, mode);
}


具体怎么用呀?
回复 支持 反对

使用道具 举报

发表于 2005-12-20 16:30:25 | 显示全部楼层
How to use ?
回复 支持 反对

使用道具 举报

发表于 2005-12-20 16:30:34 | 显示全部楼层
How to use ?
回复 支持 反对

使用道具 举报

发表于 2005-12-20 17:49:08 | 显示全部楼层
这个这么简单,手工改都行
-表示去掉这一行
+表示加上这一行
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-20 18:29:01 | 显示全部楼层
可以搞个zhcon的起动脚本,把标准输出2重定向到/dev/null,就看不到报错了,然后让进入zhcon之后的提示符前面显示“中文“,这样,就完美了。呵呵
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表