Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决Mac编译错误,消除riscv编译警告 #653

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions base/hplatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
#define ARCH_MIPS64
#elif defined(__mips__)
#define ARCH_MIPS
#elif defined(__riscv)
#define ARCH_RISCV
#else
#warning "Untested hardware architecture!"
#endif
Expand Down
4 changes: 4 additions & 0 deletions event/hloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
#include "hsocket.h"
#include "hthread.h"

#if defined(__APPLE__)
#undef HAVE_EVENTFD
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./configure会自动修改hconfig.h里面的值的,这里不要这么直接写

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已删除,仅作riscv编译警告消除

#endif

#if defined(OS_UNIX) && HAVE_EVENTFD
#include "sys/eventfd.h"
#endif
Expand Down