mirror of
https://github.com/libretro/devilutionX.git
synced 2026-11-10 17:20:56 -10:00
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
31 lines
571 B
C++
31 lines
571 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include_next <netinet/in.h>
|
|
|
|
struct in6_addr {
|
|
uint8_t s6_addr[16];
|
|
};
|
|
|
|
struct ipv6_mreq {
|
|
struct in6_addr ipv6mr_multiaddr;
|
|
unsigned ipv6mr_interface;
|
|
};
|
|
|
|
struct sockaddr_in6 {
|
|
sa_family_t sin6_family;
|
|
in_port_t sin6_port;
|
|
uint32_t sin6_flowinfo;
|
|
struct in6_addr sin6_addr;
|
|
uint32_t sin6_scope_id;
|
|
};
|
|
|
|
#define IPPROTO_IPV6 -1
|
|
#define IP_MULTICAST_IF -1
|
|
#define IPV6_JOIN_GROUP -1
|
|
#define IPV6_LEAVE_GROUP -1
|
|
#define IPV6_UNICAST_HOPS -1
|
|
#define IPV6_MULTICAST_HOPS -1
|
|
#define IPV6_MULTICAST_IF -1
|
|
#define IPV6_MULTICAST_LOOP -1
|