Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 588248 - net-analyzer/macchanger fails to build with sys-libs/musl
Summary: net-analyzer/macchanger fails to build with sys-libs/musl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2016-07-07 16:49 UTC by Fabio Scaccabarozzi
Modified: 2019-12-03 10:07 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Include sys/types.h and fix compile phase (include-types.h-for-musl.patch,391 bytes, patch)
2016-07-07 16:49 UTC, Fabio Scaccabarozzi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Scaccabarozzi 2016-07-07 16:49:50 UTC
Created attachment 439972 [details, diff]
Include sys/types.h and fix compile phase

As per title, the package fails to build with musl.
The reason being the package using (caddr_t), which is not pulled in from musl's headers (as it is with glibc's ones I would guess).
Dropping the attached patch in patches/ and making the ebuild apply it is enough to solve the issue.
Note that musl seems to provide this as a compatibility layer and declares caddr_t as "char *" (sys/types.h).

Please note that there is an open issue upstream, but the project seems dead:
https://github.com/alobbs/macchanger/issues/14

Also see the answer on stackoverflow referenced in the issue above for completeness (see comments in the accepted answers):
http://stackoverflow.com/questions/6381526/what-is-the-significance-of-caddr-t-and-when-is-it-used
Comment 1 Felix Janda 2016-11-19 21:08:32 UTC
Pull request submitted:

https://github.com/gentoo/gentoo/pull/2866
Comment 2 Jeroen Roovers gentoo-dev 2019-12-03 10:04:57 UTC
commit 934b2a3612015642792d69007c6243f6a5f123c6
Author: Felix Janda <felix.janda@posteo.de>
Date:   Sat Nov 19 15:54:32 2016 -0500

    net-proxy/macchanger: add patch for compilation with musl

    The patch is used by Alpine Linux, and has been submitted upstream:

    https://github.com/alobbs/macchanger/issues/14

    Also, do a revbump, bump EAPI, and eprefixify.

    Gentoo-Bug: https://bugs.gentoo.org/588248
    (cherry picked from commit d139a40e069d59ca895871fe47bf45d6b82ba171)