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

libbsd: fixup on darwin #25069

Merged
merged 2 commits into from Apr 21, 2017
Merged

libbsd: fixup on darwin #25069

merged 2 commits into from Apr 21, 2017

Conversation

matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented Apr 20, 2017

This is my attempt to get libbsd workin on Darwin. It's kind of a mess
right now with patches. Most of it are ugly hacks but at least it builds!

Should fix issue #23434

Motivation for this change
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

This is my attempt to get libbsd workin on Darwin. It's kind of a mess
right now with patches. Most of it are ugly hacks but at least it builds!
@mention-bot
Copy link

@matthewbauer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @amiddelk, @peterhoeg and @aristidb to be potential reviewers.

sed -i '38i#undef strlcpy' include/bsd/string.h
sed -i '38i#undef strlcat' include/bsd/string.h
substituteInPlace src/setproctitle.c \
--replace 'extern typeof(setproctitle_impl) setproctitle_stub __attribute__((weak, alias("setproctitle_impl")));' ""
Copy link
Member

Choose a reason for hiding this comment

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

Please turn this into a patch instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok I just combined everything into one patch. That way we won't change the hash for Linux systems.

@peterhoeg
Copy link
Member

Much nicer, thanks! 👍

@LnL7 LnL7 added the 6.topic: darwin Running or building packages on Darwin label Apr 21, 2017
@LnL7
Copy link
Member

LnL7 commented Apr 21, 2017

@peterhoeg Do you remember what we changed to work around this?

@LnL7 LnL7 merged commit 5238b85 into NixOS:master Apr 21, 2017
@peterhoeg
Copy link
Member

@LnL7, we didn't. We simple avoided the use of libbsd.

@matthewbauer matthewbauer deleted the libbsd-darwin branch February 22, 2019 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants