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

[BUG] LTsock fails on darwin #236

Closed
jiegec opened this issue Jul 14, 2022 · 1 comment
Closed

[BUG] LTsock fails on darwin #236

jiegec opened this issue Jul 14, 2022 · 1 comment

Comments

@jiegec
Copy link
Contributor

jiegec commented Jul 14, 2022

Describe the bug
A clear and concise description of what the bug is.
LTsock fails on darwin.

To Reproduce
Steps to reproduce the behavior:

  1. Run 'LTsock' in 'tests' folder
  2. See error

Expected behavior
A clear and concise description of what you expected to happen.
It should pass.

Program output
If applicable, paste program output text here to help explain your problem.

LTsock ... ERROR!!!  can't get IP address for macbookair
               Errno 0: Undefined error: 0

Environment (please complete the following information):

  • Kernel: Darwin 21.5.0
  • OS: macOS 12.4
  • lsof Version: 4.95.0
  • Origin: built from git master

Additional context
Add any other context about the problem here.

In Linux, the hostname is usually bound to 127.0.1.1 in /etc/hosts. But it is not the case in macOS.

jiegec added a commit that referenced this issue Jul 18, 2022
Set LSOF_INCLUDE to search libproc.h in macOS sdk

Disable unit tests until issue #236 is fixed
@jiegec
Copy link
Contributor Author

jiegec commented Jan 14, 2023

The simple fix would be adding 127.0.0.1 your.host.name in /etc/hosts. Or we can use a fallback in the test code.

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