1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 20:25:28 +03:00
aports/testing/simgear/musl-fixes.patch
Leonardo Arena 76d8addbe5 testing/simgear: new aport
Sim library for FlightGear
2017-01-05 07:23:43 +00:00

59 lines
1.6 KiB
Diff

--- a/simgear/misc/strutils.cxx
+++ b/simgear/misc/strutils.cxx
@@ -43,6 +43,11 @@
#include <windows.h>
#endif
+#ifdef _GNU_SOURCE
+#undef _GNU_SOURCE
+#define _POSIX_C_SOURCE 200112L
+#endif
+
using std::string;
using std::vector;
using std::stringstream;
--- a/simgear/package/md5.h
+++ b/simgear/package/md5.h
@@ -20,9 +20,9 @@
#endif
#if defined(_MSC_VER)
-typedef unsigned char u_int8_t;
-typedef unsigned int u_int32_t;
-typedef unsigned __int64 u_int64_t;
+typedef unsigned char uint8_t;
+typedef unsigned int uint32_t;
+typedef unsigned __int64 uint64_t;
#endif
#define MD5_BLOCK_LENGTH 64
@@ -30,16 +30,16 @@
#define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH * 2 + 1)
typedef struct MD5Context {
- u_int32_t state[4]; /* state */
- u_int64_t count; /* number of bits, mod 2^64 */
- u_int8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */
+ uint32_t state[4]; /* state */
+ uint64_t count; /* number of bits, mod 2^64 */
+ uint8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */
} SG_MD5_CTX;
void SG_MD5Init(SG_MD5_CTX *);
-void SG_MD5Update(SG_MD5_CTX *, const u_int8_t *, size_t);
+void SG_MD5Update(SG_MD5_CTX *, const uint8_t *, size_t);
void SG_MD5Pad(SG_MD5_CTX *);
-void SG_MD5Final(u_int8_t [MD5_DIGEST_LENGTH], SG_MD5_CTX *);
-void SG_MD5Transform(u_int32_t [4], const u_int8_t [MD5_BLOCK_LENGTH]);
+void SG_MD5Final(uint8_t [MD5_DIGEST_LENGTH], SG_MD5_CTX *);
+void SG_MD5Transform(uint32_t [4], const uint8_t [MD5_BLOCK_LENGTH]);
#ifdef __cplusplus
} // of extern C
@@ -49,4 +49,4 @@
-
\ No newline at end of file
+