Skip to content

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

Closed
pks-t wants to merge 1 commit intoPulse-Eight:masterfrom
pks-t:pks/setbuildinfo
Closed

fixed: fix build if hostname does not support '-f' argument#471
pks-t wants to merge 1 commit intoPulse-Eight:masterfrom
pks-t:pks/setbuildinfo

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.

2 participants