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

fixed: fix build if hostname does not support '-f' argument #471

Closed
wants to merge 1 commit into from

Conversation

pks-t
Copy link
Contributor

@pks-t pks-t commented Sep 26, 2019

Part of the build information compiled into the library is the host on
which it was built. This information is generated by executing the
command hostname -f, but the '-f' argument may not be available on all
platforms (e.g. coreutils v8.30 does not have it). As a result, the
command will spit an error message that spans multiple lines, break the
format of the define in "src/libcec/env.h" and as a result the error
will fail due to invalid syntax.

Fix the issue by falling back to just hostname if hostname -f
returns an error.

Part of the build information compiled into the library is the host on
which it was built. This information is generated by executing the
command `hostname -f`, but the '-f' argument may not be available on all
platforms (e.g. coreutils v8.30 does not have it). As a result, the
command will spit an error message that spans multiple lines, break the
format of the define in "src/libcec/env.h" and as a result the error
will fail due to invalid syntax.

Fix the issue by falling back to just `hostname` if `hostname -f`
returns an error.
@opdenkamp
Copy link
Contributor

I'm merging this PR in along with some other PRs in a few.
Thanks!

@opdenkamp opdenkamp closed this in 479bddf Mar 28, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants