Skip to content

Compilation failed, error: redefinition of 'struct mmsghdr #253

@DogRex

Description

@DogRex

BufferSock.app 27行定义了结构体mmsghdr,但这个已经在x86_64-linux-gnu/sys/socket.h中定义了,报重复定义的错误

"root/software/ZLMediakit/3rdpart/2LToolkit/src/Network/Buffersock.cpp:27:8: error: redefinition of 'struct mmsghdr' struct mmsghdr In file included from/usr/include/netinet/in.h:23:0from /usr/include/netdb.h:27,from /root/software/ZLMediaKit/3rdpart/ZLToolKit/src/Network/sockutil.h:21from /root/software/ZLMediaKit/3rdpart/ZLToolKit/src/Network/BufferSock.h:27from /root/software/zLMediaKit/3rdpart/ZLToolKit/src/Network/BufferSock.cpp:12 usr/include/x86_64-linux-gnu/sys/socket.h:101:8:error: previous definition of 'struct mmsghdr' struct mmsghdr 3rdpart/CMakeFiles/zltoolkit.dir/build.make:185: recipe for target '3rdpart/cMakeFiles/zltoolkit.dir/ZLToolKit/src/Network/BufferSock.cpp.o' failed

image

Please ask how to solve this issue

BufferSock.app 27行定义了结构体mmsghdr,但这个已经在x86_64-linux-gnu/sys/socket.h中定义了,报重复定义的错误

"root/software/ZLMediakit/3rdpart/2LToolkit/src/Network/Buffersock.cpp:27:8: error: redefinition of 'struct mmsghdrstruct mmsghdr f In file included from/usr/include/netinet/in.h:23:0from /usr/include/netdb.h:27,from /root/software/ZLMediaKit/3rdpart/ZLToolKit/src/Network/sockutil.h:21from /root/software/ZLMediaKit/3rdpart/ZLToolKit/src/Network/BufferSock.h:27from /root/software/zLMediaKit/3rdpart/ZLToolKit/src/Network/BufferSock.cpp:12 usr/include/x86_64-linux-gnu/sys/socket.h:101:8:error: previous definition of 'struct mmsghdrstruct mmsghdr3rdpart/CMakeFiles/zltoolkit.dir/build.make:185: recipe for target '3rdpart/cMakeFiles/zltoolkit.dir/ZLToolKit/src/Network/BufferSock.cpp.o' failec

image

请问这个应该怎么解决

TRANS_BY_GITHUB_AI_ASSISTANT

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions