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

Functions gethostbyname and gethostbyaddr are deprecated #407

Open
marcosbc opened this issue Aug 8, 2023 · 1 comment
Open

Functions gethostbyname and gethostbyaddr are deprecated #407

marcosbc opened this issue Aug 8, 2023 · 1 comment

Comments

@marcosbc
Copy link

marcosbc commented Aug 8, 2023

Hi luasocket developers! While trying to build this library on Open Build Service, I received a warning:

binary-or-shlib-calls-gethostbyname /usr/local/lib/lua/5.1/socket/core.so
binary-or-shlib-calls-gethostbyname /usr/local/lib/lua/5.1/socket/serial.so
binary-or-shlib-calls-gethostbyname /usr/local/lib/lua/5.1/socket/unix.so
binary-or-shlib-calls-gethostbyname /usr/local/lib/lua/5.1/ssl.so
The binary calls gethostbyname(). Please port the code to use getaddrinfo().

It seems like this library is using gethostbyname and gethostbyaddr in src/usocket.h#L23, but these functions are obsolete and have been marked as deprecated in favor of getaddrinfo and getnameinfo. Note that this is explained in the man pages for gethostbyname: https://man7.org/linux/man-pages/man3/gethostbyname.3.html

I couldn't find any existing issues related to this, but if that isn't the case, feel free to close this.

@marcosbc marcosbc changed the title Functions gethostbyname and are deprecated Functions gethostbyname and gethostbyaddr are deprecated Aug 8, 2023
@alerque
Copy link
Member

alerque commented Aug 12, 2023

PR contributions welcome! Several of us are around and helping to facilitate contributions, but none of us have much spare time for development work in this right now.

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

No branches or pull requests

2 participants