fixed: fix build if hostname does not support '-f' argument #471
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 allplatforms (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
ifhostname -f
returns an error.