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

Fix build and warning with musl libc #615

Merged
merged 2 commits into from
Dec 25, 2018
Merged

Conversation

ncopa
Copy link
Contributor

@ncopa ncopa commented Dec 25, 2018

No description provided.

Only GNU libc has implementation of the GNU variant of strerror_r, so
also for __GLIBC__ to determine which strerror_r implemenation to use.

This fixes build with musl libc, which makes some, but not all, GNU
extensions available with _GNU_SOURCE.
Fix warnings when built with musl libc by using the correct path for
errno.h as defined in POSIX.

Fixes the following warning:
In file included from /home/ncopa/src/exiv2/src/http.cpp:74:
/usr/include/sys/errno.h:1:2: warning: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Wcpp]
 #warning redirecting incorrect #include <sys/errno.h> to <errno.h>
  ^~~~~~~
@clanmills clanmills requested a review from piponazo December 25, 2018 11:36
@clanmills clanmills added this to the v0.27.1 milestone Dec 25, 2018
@clanmills
Copy link
Collaborator

Seasons Greetings.

Thanks for sending this. There's something familiar about this. It'll get integrated next week. Time for a break from Exiv2.

@codecov
Copy link

codecov bot commented Dec 25, 2018

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #615   +/-   ##
=======================================
  Coverage   62.61%   62.61%           
=======================================
  Files         154      154           
  Lines       21094    21094           
=======================================
  Hits        13209    13209           
  Misses       7885     7885
Impacted Files Coverage Δ
src/http.cpp 0% <ø> (ø) ⬆️
src/futils.cpp 86.95% <ø> (ø) ⬆️

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 e1e40cc...6f1c8d5. Read the comment docs.

Copy link
Collaborator

@piponazo piponazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle everything looks fine and the CI jobs passed. Would you mind to give some more details about the platform in which you get warnings and errors? Just for the sake of future reference 😉

@piponazo piponazo merged commit 92ee962 into Exiv2:master Dec 25, 2018
@ncopa
Copy link
Contributor Author

ncopa commented Dec 25, 2018

It was Alpine Linux, x86_64, which uses musl libc instead of glibc.

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.

3 participants