tpm2-software / tpm2-totp

Attest the trustworthiness of a device against a human using time-based one-time passwords
https://tpm2-software.github.io
BSD 3-Clause "New" or "Revised" License
159 stars 35 forks source link

src/libtpm2-totp.c: include <endian.h> #63

Closed ffontaine closed 4 years ago

ffontaine commented 4 years ago

Fix the following build failure with musl:

src/libtpm2-totp.c: In function ‘tpm2totp_calculate’:
src/libtpm2-totp.c:826:11: warning: implicit declaration of function ‘htobe64’ [-Wimplicit-function-declaration]
     tmp = htobe64(tmp);
           ^~~~~~~

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

codecov[bot] commented 4 years ago

Codecov Report

Merging #63 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #63   +/-   ##
=======================================
  Coverage   84.05%   84.05%           
=======================================
  Files           4        4           
  Lines         759      759           
=======================================
  Hits          638      638           
  Misses        121      121
Impacted Files Coverage Δ
src/libtpm2-totp.c 84.66% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 063fb62...0de66c8. Read the comment docs.

ffontaine commented 4 years ago

Yes, with this fix, tpm2-totp can be built successfully on buildroot. A new release would be appreciated, this will avoid to apply this patch on top of 0.2.0.

diabonas commented 4 years ago

OK, I just tagged a release candidate 0.2.1_rc0 including this as well as another small fix.