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

aeron ping-pong example build should detect sendmmsg #1595

Open
vaci opened this issue May 1, 2024 · 0 comments
Open

aeron ping-pong example build should detect sendmmsg #1595

vaci opened this issue May 1, 2024 · 0 comments

Comments

@vaci
Copy link
Contributor

vaci commented May 1, 2024

The ping_pong_raw example doesn't check the HAVE_SENDMMSG build macro, so it fails to build on my system which lacks that call:

aeron/aeron-samples/src/main/c/raw/ping_pong_raw.c: In function 'aeron_ping_pong_raw_sendmmsg':
aeron/aeron-samples/src/main/c/raw/ping_pong_raw.c:169:26: warning: implicit declaration of function 'sendmmsg'; did you mean 'sendmsg'? [-Wimplicit-function-declaration]
169 | int sendmsg_result = sendmmsg(send_fd, &send_msghdr, 1, 0);
| ^~~~~~~~
| sendmsg
[ 44%] Linking C executable ../../../../binaries/ping_pong_raw
bin/ld: CMakeFiles/ping_pong_raw.dir/raw/ping_pong_raw.c.o: in function aeron_ping_pong_raw_sendmmsg': ping_pong_raw.c:(.text.aeron_ping_pong_raw_sendmmsg+0x55): undefined reference to sendmmsg'
collect2: error: ld returned 1 exit status

I think the code just need an appropriate macro guard and alternative behaviour here:
https://github.com/real-logic/aeron/blob/1.44.1/aeron-samples/src/main/c/raw/ping_pong_raw.c#L169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant