Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 588248

Summary: net-analyzer/macchanger fails to build with sys-libs/musl
Product: Gentoo Linux Reporter: Fabio Scaccabarozzi <fsvm88>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: netmon, robbat2, tsmksubc
Priority: Normal Keywords: PATCH, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/alobbs/macchanger/issues/14
https://github.com/gentoo/gentoo/pull/2866
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: Include sys/types.h and fix compile phase

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 (RETIRED) 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)