-
Notifications
You must be signed in to change notification settings - Fork 292
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
Include libgen.h
for BSD builds
#481
Conversation
Signed-off-by: Tom Sullivan <tom@msbit.com.au>
Hey @msbit, I just tested it with the current master, and it works fine. Thank You |
Hey @GPaulovics, I did have this happen for me under macOS, building
Versions:
I'll double check on my other laptop running 10.14 too. |
Yep, same with latest macOS:
|
Now this is weird. With the latest master I can reproduce the issue as well. But if I go back to https://github.com/lastpass/lastpass-cli/tree/f0f4e83c43ef793c40da57cc746052573a96d914 |
And same output under OpenBSD:
Versions:
|
Ah sorry @GPaulovics, I missed your comment. Looks like 4161de9 introduced using |
Yeah, you are totally right. |
In order to prevent weird version discussions (see lastpass#481 for such an example) this changeset tries to do versioning the same way as the git project does this. Some caveats apply: 1) Maintainers *must* use annotated tags. Release 1.3.1 is not annotated for example. 2) Maintainers *must* can use a `version` file in the repo to override any logic. This will generate a "static" version. 3) Maintainers *must* bump the version in `LASTPASS-VERSION-GEN` after a release. Some benefits apply too: 1) We can see clearly at which version the client was build 2) We can see if it was a "dirty" build ``` $ lpass --version LastPass CLI v1.3.0.34.g5bf38bc.dirty ``` Signed-off-by: Wesley Schwengle <wesley@schwengle.net>
Under Linux/glibc one of two implementations of
basename
can be selected, the GNU one provided by:and the POSIX one by:
However, BSDs only have the POSIX implementation, so conditionally include the header if BSD related definitions exist.
This fixes segfaults when displaying usage (
lpass --help
) under (at least) macOS and OpenBSD.