Rup0rt / pcapfix

repair corrupted pcap files
http://f00l.de/pcapfix/
GNU General Public License v3.0
202 stars 34 forks source link

Use <stdint.h> for portability #26

Closed thesamesam closed 2 years ago

thesamesam commented 2 years ago

This fixes a build failure on musl at the least. pcapfix was using some non-standard types like u_int32_t: fortunately has a nice set of types with exactly the same properties, named e.g. uint32_t, and so on.

It looks like MSVC provides nowadays too.

This manifested in a build failure on musl systems like:

pcap.h:31:3: error: unknown type name u_int32_t
   31 |   u_int32_t magic_number;   /* magic number */
      |   ^~~~~~~~~
pcap.h:32:3: error: unknown type name u_int16_t

Bug: https://bugs.gentoo.org/712772

Rup0rt commented 2 years ago

Thank you these fixes. I merged them into current devel branch.