blob: dc7b0488a53514a073b473e2951e0edb10e9d193 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001Define the x* wrappers for uclibc as well
2
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05003Upstream-Status: Submitted [RPM5 maintainer]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05007Index: rpm/rpmio/rpmio.h
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008===================================================================
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05009--- rpm.orig/rpmio/rpmio.h
10+++ rpm/rpmio/rpmio.h
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011@@ -23,7 +23,8 @@
12 */
13 /*@{*/
14 #if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \
15- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
16+ (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && \
17+ !defined(__UCLIBC__)
18 #define USE_COOKIE_SEEK_POINTER 1
19 typedef _IO_off64_t _libio_off_t;
20 typedef _libio_off_t * _libio_pos_t;
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050021Index: rpm/system.h
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022===================================================================
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050023--- rpm.orig/system.h
24+++ rpm/system.h
25@@ -489,7 +489,7 @@ extern void muntrace (void)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026 #endif /* defined(__LCLINT__) */
27
28 /* Memory allocation via macro defs to get meaningful locations from mtrace() */
29-#if defined(__GNUC__)
30+#if defined(__GNUC__) || defined(__UCLIBC__)
31 #define xmalloc(_size) (malloc(_size) ? : vmefail(_size))
32 #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail(_size))
33 #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail(_size))
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050034Index: rpm/lib/librpm.vers
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035===================================================================
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050036--- rpm.orig/lib/librpm.vers
37+++ rpm/lib/librpm.vers
38@@ -406,6 +406,10 @@ LIBRPM_0
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039 specedit;
40 strict_erasures;
41 XrpmtsiInit;
42+ xmalloc;
43+ xrealloc;
44+ xcalloc;
45+ xstrdup;
46 local:
47 *;
48 };
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050049Index: rpm/rpmio/librpmio.vers
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050===================================================================
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050051--- rpm.orig/rpmio/librpmio.vers
52+++ rpm/rpmio/librpmio.vers
53@@ -1455,6 +1455,10 @@ LIBRPMIO_0
54 _mongoc_write_result_init;
55 _mongoc_write_result_merge;
56 _mongoc_write_result_merge_legacy;
Patrick Williamsc124f4f2015-09-15 14:41:29 -050057+ xmalloc;
58+ xrealloc;
59+ xcalloc;
60+ xstrdup;
61 local:
62 *;
63 };