Skip to content

Commit 2d67379

Browse files
committed
Replace some older types with stdint.h types
This should help provide some compatibility for older glibc versions
1 parent 704135e commit 2d67379

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

fake_libc_include/_fake_typedefs.h

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
#ifndef _FAKE_TYPEDEFS_H
22
#define _FAKE_TYPEDEFS_H
33

4+
#define u_char uint8_t
5+
#define u_short uint16_t
6+
#define u_int uint32_t
7+
#define u_long uint64_t
8+
9+
#define u_int8_t uint8_t
10+
#define u_int16_t uint16_t
11+
#define u_int32_t uint32_t
12+
#define u_int64_t uint64_t
13+
14+
#define ushort uint16_t
15+
#define uint uint32_t
16+
417
typedef int size_t;
518
typedef int __builtin_va_list;
619
typedef int __gnuc_va_list;
@@ -45,12 +58,6 @@ typedef int wchar_t;
4558
typedef int __off_t;
4659
typedef int __pid_t;
4760
typedef int __loff_t;
48-
typedef int u_char;
49-
typedef int u_short;
50-
typedef int u_int;
51-
typedef int u_long;
52-
typedef int ushort;
53-
typedef int uint;
5461
typedef int clock_t;
5562
typedef int time_t;
5663
typedef int daddr_t;

generate-wrapper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ def generate_header(sysincludes, functions, initname):
124124
retval.append(f"// generated by {PROGNAME} {VERSION} on {NOW}")
125125
retval.append(f"// flags: {FLAGS}")
126126
retval.append("//")
127+
retval.append("#include <stdint.h>\n")
127128

128129
for function in functions:
129130
retval.append(f"#define {function} {function}_dylibloader_orig_{initname}")

0 commit comments

Comments
 (0)