linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / libaal / libaal-1.0.6-glibc-2.26.patch
blob6d49682f03ae86bf1a8d1ff73a4c429bbb4e2b74
1 Date: 2017-09-02 13:03:15.353403096 +0200
2 From: Jan Engelhardt <jengelh@inai.de>
4 Stop redefining libc definitions that cause build failures under glibc-2.26.
6 [ 46s] In file included from /usr/include/sys/types.h:156:0,
7 [ 46s] from /usr/include/stdlib.h:279,
8 [ 46s] from malloc.c:15:
9 [ 46s] /usr/include/bits/stdint-intn.h:27:19: error: conflicting types for 'int64_t'
10 [ 46s] typedef __int64_t int64_t;
11 [ 46s] ^~~~~~~
12 [ 46s] In file included from ../include/aal/libaal.h:17:0,
13 [ 46s] from malloc.c:6:
14 [ 46s] ../include/aal/types.h:35:33: note: previous declaration of 'int64_t' was here
15 [ 46s] typedef long long int int64_t;
18 ---
19 include/aal/types.h | 48 ++----------------------------------------------
20 1 file changed, 2 insertions(+), 46 deletions(-)
22 Index: libaal-1.0.6/include/aal/types.h
23 ===================================================================
24 --- libaal-1.0.6.orig/include/aal/types.h
25 +++ libaal-1.0.6/include/aal/types.h
26 @@ -26,24 +26,7 @@
27 #undef ESTRUCT
28 #define ESTRUCT 50
30 -#ifndef __int8_t_defined
31 -#define __int8_t_defined
32 -typedef signed char int8_t;
33 -typedef short int int16_t;
34 -typedef int int32_t;
35 -__extension__
36 -typedef long long int int64_t;
37 -#endif
39 -typedef unsigned char uint8_t;
40 -typedef unsigned short int uint16_t;
41 -#ifndef __uint32_t_defined
42 -#define __uint32_t_defined
43 -typedef unsigned int uint32_t;
44 -__extension__
45 -typedef unsigned long long int uint64_t;
46 -#endif
48 +#include <stdint.h>
49 #define MAX_UINT8 ((uint8_t)~0)
50 #define MAX_UINT16 ((uint16_t)~0)
51 #define MAX_UINT32 ((uint32_t)~0)
52 @@ -53,36 +36,9 @@ typedef unsigned long long int uint64_t
53 because we don't want use gcc builtins in minimal mode for achive as small
54 binary size as possible. */
56 -#ifndef ENABLE_MINIMAL
57 # include <stdarg.h>
58 -#else
59 -#ifndef _VA_LIST_
60 -#define _VA_LIST_
61 -typedef char *va_list;
62 -#endif
63 -#undef va_arg
64 -#undef va_end
65 -#undef va_start
67 -#define va_end(ap) \
68 - do {} while(0);
70 -#define va_start(ap, p) \
71 - (ap = (char *)(&(p)+1))
73 -#define va_arg(ap, type) \
74 - ((type *)(ap += sizeof(type)))[-1]
75 -#endif
77 -/* As libaal may be used without any standard headers, we need to declare NULL
78 - macro here in order to avoid compilation errors. */
79 -#undef NULL
81 -#if defined(__cplusplus)
82 -# define NULL 0
83 -#else
84 -# define NULL ((void *)0)
85 -#endif
86 +#include <stdio.h>
88 /* Simple type for direction denoting */
89 enum aal_dir {