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

otp_net.c: use EAI_OVERFLOW when it is defined #1255

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

barracuda156
Copy link

Closes: #1254

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@pguyot
Copy link
Collaborator

pguyot commented Aug 19, 2024

We probably should use cmake macro check_symbol_exists instead of C #ifdef which doesn't catch enums.

In src/platforms/generic_unix/lib/CMakeLists.txt, we check for EAI_BADHINTS only. Is EAI_OVERFLOW the only undefined symbol on your platform? Could you please confirm the darwin version you are using?

@barracuda156 barracuda156 marked this pull request as draft August 19, 2024 05:36
@barracuda156
Copy link
Author

barracuda156 commented Aug 19, 2024

We probably should use cmake macro check_symbol_exists instead of C #ifdef which doesn't catch enums.

In src/platforms/generic_unix/lib/CMakeLists.txt, we check for EAI_BADHINTS only. Is EAI_OVERFLOW the only undefined symbol on your platform? Could you please confirm the darwin version you are using?

@pguyot I actually found this old issue now: OpenSMTPD/OpenSMTPD#1246
Specifically, see: OpenSMTPD/OpenSMTPD#1246 (comment)

There the solution was OpenSMTPD/OpenSMTPD@276e064

P. S. My original fix was borrowed from mojca/luasocket@4189bd5

@barracuda156
Copy link
Author

@pguyot And yes, that was the only problematic define for me. I am on 10.6 ppc, which is somewhat in between 10.5.8 and 10.6.8 in terms of SDK features.

@barracuda156
Copy link
Author

@pguyot I have updated the patch here.

@pguyot pguyot marked this pull request as ready for review November 2, 2024 06:03
@bettio
Copy link
Collaborator

bettio commented Dec 15, 2024

Sorry for the late review, if you don't mind it would be great having this in release-0.6 branch, so we can include it with next v0.6.6 release.

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

Successfully merging this pull request may close these issues.

0.6.4 fails to build: error: 'EAI_OVERFLOW' undeclared (first use in this function); did you mean 'EOVERFLOW'?
3 participants