|
今天到网上下了一个hztty-2.0,可是编译hztty-2.0时出错,具体情况如下。
在make linux 之后显示出错信息:
. . . . . .
tty.c:487: void value not ignored as it ought to be
****** 截取其中有用的部分 ******
... ...
struct utmp utmp;
... ...
486: (void) strncpy ((char *)utmp.ut_id, ttydev + strlen(ttydev) - PTYCHLEN,
487: sizeof(utmp.ut_id)); <---提示此行出错
****** /usr/include/bits/utmp.h中关于对utmp结构类型的定义: ******
struct utmp
{
.....
char ut_id[4];
... ...
}
****** /usr/include/string.h中关于对strncpy函数的申明: ******
/* Copy no more than N characters of SRC to DEST. */
extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) __THROW; |
|