0

I notice under my /usr/include directory, there is a folder called "bits" with a bunch of header files. Some of the files are "bits/errno.h" or "bits/in.h".

Where do these files come from? They don't look to be part of libc. E.g, musl doesn't ship with them: https://github.com/cloudius-systems/musl/tree/master/include, however, I do notice that musl does depend on them.

Roymunson
  • 5,099
  • 10
  • 48
  • 106
  • Not exactly a duplicate, but [this](https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h) may help. – bnaecker Sep 14 '20 at 23:53
  • 2
    They are provided by the compiler and/or libraries. They're designed to provide bits of information that may be needed by one or more other headers. They may vary between different types of system. They limit the platform-specific changes for major headers. They should not be used directly by a program — programs should include `"header.h"` or `"sys/header.h"` (or use the angle-bracket notation ``). The preprocessor selects the correct `bits/*.h` files. – Jonathan Leffler Sep 14 '20 at 23:55

1 Answers1

0

They're most likely part of libc(x)-dev (nomenclature will depend on your distro of choice)...

For the debian/ubuntu family you could try

dpk -S /path/to/bits/errno.h

For the RHEL/Centos family you could try

rpm -qf /path/to/bits/errno.h
tink
  • 11,396
  • 4
  • 38
  • 45