Linux下array type has incomplete element type,怎么解决

hysea2006 2013-12-16 03:09:20
各位大侠,我定义了一个结构体
struct wt_sock_fun_st {
uint8 flag; // 对应enum CONN_SOCK_FLAG
uint8 authed; // 对应enum CONN_AUTH_FLAG
uint16 array_id; // 在 g_conn_sock_arr 数组中的索引

uint16 order; // 表示交互顺序
uint16 pad2;

SOCKET sock;

SockRecvFun recv_fun; // 主服务器、认证服务器,有不同的接收处理函数

uint32 router_seq; // 路由器产生的随机数,用于加密、预防copy 攻击
uint32 srv_seq; // 服务器产生的随机数,用于加密、预防copy 攻击
};
其中SockRecvFun的定义是
typedef int (*SockRecvFun)(struct wt_sock_fun_st *wt_sock_fun_st);
而后我定义:
int wt_base_srv_recv_fun(struct wt_sock_fun_st *wt_sock_fun_st);
int wt_auth_srv_recv_fun(struct wt_sock_fun_st *wt_sock_fun_st);

在程序中,我源文件中定义:struct wt_sock_fun_st g_conn_sock_arr[MAX_CONN_SOCK];
在头文件中声明:extern struct wt_sock_fun_st g_conn_sock_arr[MAX_CONN_SOCK];
这里在Linux下会出现array type has incomplete element type错误
在其他地方可以会用上wt_sock_fun_st->recv_fun = wt_base_srv_recv_fun;
请各位大侠帮忙解决这个问题吧?
...全文
1167 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
笔记本的风扇控制 ---------------------------------------- 09 November 2006. Summary of changes for version 20061109: 1) ACPI CA Core Subsystem: Optimized the Load ASL operator in the case where the source operand is an operation region. Simply map the operation region memory, instead of performing a bytewise read. (Region must be of type SystemMemory, see below.) Fixed the Load ASL operator for the case where the source operand is a region field. A buffer object is also allowed as the source operand. BZ 480 Fixed a problem where the Load ASL operator allowed the source operand to be an operation region of any type. It is now restricted to regions of type SystemMemory, as per the ACPI specification. BZ 481 Additional cleanup and optimizations for the new Table Manager code. AcpiEnable will now fail if all of the required ACPI tables are not loaded (FADT, FACS, DSDT). BZ 477 Added #pragma pack(8/4) to acobject.h to ensure that the structures in this header are always compiled as aligned. The ACPI_OPERAND_OBJECT has been manually optimized to be aligned and will not work if it is byte-packed. Example Code and Data Size: These are the sizes for the OS- independent acpica.lib produced by the Microsoft Visual C++ 6.0 32- bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size. Previous Release: Non-Debug Version: 78.1K Code, 17.1K Data, 95.2K Total Debug Version: 155.4K Code, 63.1K Data, 218.5K Total Current Release: Non-Debug Version: 77.9K Code, 17.0K Data, 94.9K Total Debug Version: 155.2K Code, 63.1K Data, 218.3K Total 2) iASL Compiler/Disassembler and Tools: Fixed a problem where the presence of the _OSI predefined control method within complex expressions could cause an internal compiler error. AcpiExec: Implemented full region support for multiple address spaces. SpaceId is now part of the REGION object. BZ 429 ---------------------------------------- 11 Oc

23,223

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧