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

Add -lresolv on Darwin #695

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
1 change: 1 addition & 0 deletions bin/9l
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ case "$tag" in
;;
*Darwin*)
ld="${CC9:-gcc} -m64 $CC9FLAGS"
extralibs="-lresolv"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this cause any unintended side effects on earlier versions of macOS?

Copy link
Contributor Author

@cptaffe cptaffe Feb 10, 2025

Choose a reason for hiding this comment

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

I'm not sure, I don't have a machine running an older version. Is it possible to branch based on version here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like -lresolv has been in use as far back as OS X 10.6, to fix this exact linker error, see here.

;;
*SunOS*)
ld="${CC9:-cc} -g $CC9FLAGS"
Expand Down