Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 20 Nov 2017 14:31:26 -0500
From: Rich Felker <>
Subject: Re: Compiling libpcap from source using musl and clang

On Mon, Nov 20, 2017 at 02:02:43PM -0500, Hamed Ghavamnia wrote:
> Hi to all,
> I'm trying to compile the libpcap library from source using musl and clang.
> It compiles if I only use clang with libc, but using musl it dies.
> The problem I'm currently facing is that the source codes require header
> files such as linux/types.h, but there isn't any linux sub folder in the
> include folder of my compiled musl library. Is that normal? Should I be
> able to compile libpcap using musl, or does it require any features which
> haven't been implemented in musl yet?

To get the linux/* headers you need to install them. If you're using a
cross toolchain built with musl-cross-make, they're installed for you
in its sysroot. Otherwise you can install them yourself from the
kernel sources or if you're using compiler wrappers on a glibc-based
system you can make symlinks to the copies of the Linux headers in the
glibc include dir (/usr/include/linux, etc.). Do NOT add
-I/usr/include though to get them; this will use glibc headers and
badly break things.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.