diff mbox series

[oe,meta-oe,06/43] lvm2: Fix patch errors found with musl

Message ID 20170331164247.5052-6-raj.khem@gmail.com
State Accepted
Commit 3ad787c673817dfa3cc378b8300557fe624e44d9
Headers show
Series [oe,meta-oe,01/43] gpm: Update to use git src uri | expand

Commit Message

Khem Raj March 31, 2017, 4:42 p.m. UTC
The patches had syntax errors which are only
visible when using musl libs

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../lvm2/0001-implement-libc-specific-reopen_stream.patch  | 14 +++++++-------
 .../lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch   | 14 +++++++-------
 2 files changed, 14 insertions(+), 14 deletions(-)

-- 
2.12.1

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Comments

Peter Kjellerstedt April 1, 2017, 3:50 a.m. UTC | #1
> -----Original Message-----

> From: openembedded-devel-bounces@lists.openembedded.org

> [mailto:openembedded-devel-bounces@lists.openembedded.org] On Behalf Of

> Khem Raj

> Sent: den 31 mars 2017 18:42

> To: openembedded-devel@lists.openembedded.org

> Subject: [oe] [meta-oe][PATCH 06/43] lvm2: Fix patch errors found with

> musl

> 

> The patches had syntax errors which are only

> visible when using musl libs

> 

> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> ---

>  .../lvm2/0001-implement-libc-specific-reopen_stream.patch  | 14 +++++++-------

>  .../lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch   | 14 +++++++-------

>  2 files changed, 14 insertions(+), 14 deletions(-)

> 

> diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch b/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch

> index f09fd76b3..b6a7f1a92 100644

> --- a/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch

> +++ b/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch

> @@ -1,7 +1,7 @@

> -From ede7976da9431573b0104dbcfe91a32c02dbea13 Mon Sep 17 00:00:00 2001

> +From e3103459416616d3b8508e7176e897b0ae6c90f2 Mon Sep 17 00:00:00 2001

>  From: Dengke Du <dengke.du@windriver.com>

>  Date: Tue, 25 Oct 2016 11:49:40 +0000

> -Subject: [PATCH 1/4] implement libc specific reopen_stream

> +Subject: [PATCH] implement libc specific reopen_stream

> 

>  musl defines stdin/stdio/stderr as constant types which means

>  we can not assign to them as we are doing here but works ok with glibc

> @@ -13,15 +13,15 @@ http://git.alpinelinux.org/cgit/aports/tree/main/lvm2/fix-stdio-usage.patch

> 

>  Signed-off-by: Khem Raj <raj.khem@gmail.com>

>  Signed-off-by: Dengke Du <dengke.du@windriver.com>

> ----

> -Upstream-Status: Pending

> +

> +%% original patch: 0001-implement-libc-specific-reopen_stream.patch


This chunk does not look as it was intended...

>  ---

>   lib/log/log.c      | 6 ++++++

>   tools/lvmcmdline.c | 6 +++---

>   2 files changed, 9 insertions(+), 3 deletions(-)

> 

>  diff --git a/lib/log/log.c b/lib/log/log.c

> -index c933154..638839d 100644

> +index c933154..3581084 100644

>  --- a/lib/log/log.c

>  +++ b/lib/log/log.c

>  @@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_

> @@ -38,7 +38,7 @@ index c933154..638839d 100644

>   }

>  +#else

>  +{

> -+	return (freopen(NULL, mode, *stream) != NULL)

> ++	return (freopen(NULL, mode, *stream) != NULL);

>  +}

>  +#endif

> 

> @@ -76,5 +76,5 @@ index 9a4deb7..f1f18e6 100644

>   		       strerror(errno));

>   		return 0;

>  --

> -2.9.3

> +2.12.0

> 

> diff --git a/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch b/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch

> index 5baafab3e..ef385099f 100644

> --- a/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch

> +++ b/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch

> @@ -1,20 +1,20 @@

> -From 8706a6d33753d8b2cf5bb2a12bd6880b371ce337 Mon Sep 17 00:00:00 2001

> +From 3ae9c0b607ec33fb07f32a41e9d28cc9068dd39a Mon Sep 17 00:00:00 2001

>  From: Dengke Du <dengke.du@windriver.com>

>  Date: Tue, 25 Oct 2016 11:52:44 +0000

> -Subject: [PATCH 2/4] Guard use of mallinfo() with __GLIBC__

> +Subject: [PATCH] Guard use of mallinfo() with __GLIBC__

> 

>  This API is glibc-only

> 

>  Signed-off-by: Khem Raj <raj.khem@gmail.com>

>  Signed-off-by: Dengke Du <dengke.du@windriver.com>

> ----

> -Upstream-Status: Pending

> +

> +%% original patch: 0002-Guard-use-of-mallinfo-with-__GLIBC__.patch


Same here.

>  ---

>   lib/mm/memlock.c | 2 +-

>   1 file changed, 1 insertion(+), 1 deletion(-)

> 

>  diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c

> -index da90144..c1bf8fb 100644

> +index da90144..f34f890 100644

>  --- a/lib/mm/memlock.c

>  +++ b/lib/mm/memlock.c

>  @@ -150,7 +150,7 @@ static void _touch_memory(void *mem, size_t size)

> @@ -22,10 +22,10 @@ index da90144..c1bf8fb 100644

>   static void _allocate_memory(void)

>   {

>  -#ifndef VALGRIND_POOL

> -+#ifndef VALGRIND_POOL && defined(__GLIBC__)

> ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__)

>   	void *stack_mem;

>   	struct rlimit limit;

>   	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;

>  --

> -2.9.3

> +2.12.0

> 

> --

> 2.12.1


//Peter

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Khem Raj April 1, 2017, 3:20 p.m. UTC | #2
On Fri, Mar 31, 2017 at 8:50 PM, Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
>> -----Original Message-----

>> From: openembedded-devel-bounces@lists.openembedded.org

>> [mailto:openembedded-devel-bounces@lists.openembedded.org] On Behalf Of

>> Khem Raj

>> Sent: den 31 mars 2017 18:42

>> To: openembedded-devel@lists.openembedded.org

>> Subject: [oe] [meta-oe][PATCH 06/43] lvm2: Fix patch errors found with

>> musl

>>

>> The patches had syntax errors which are only

>> visible when using musl libs

>>

>> Signed-off-by: Khem Raj <raj.khem@gmail.com>

>> ---

>>  .../lvm2/0001-implement-libc-specific-reopen_stream.patch  | 14 +++++++-------

>>  .../lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch   | 14 +++++++-------

>>  2 files changed, 14 insertions(+), 14 deletions(-)

>>

>> diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch b/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch

>> index f09fd76b3..b6a7f1a92 100644

>> --- a/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch

>> +++ b/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch

>> @@ -1,7 +1,7 @@

>> -From ede7976da9431573b0104dbcfe91a32c02dbea13 Mon Sep 17 00:00:00 2001

>> +From e3103459416616d3b8508e7176e897b0ae6c90f2 Mon Sep 17 00:00:00 2001

>>  From: Dengke Du <dengke.du@windriver.com>

>>  Date: Tue, 25 Oct 2016 11:49:40 +0000

>> -Subject: [PATCH 1/4] implement libc specific reopen_stream

>> +Subject: [PATCH] implement libc specific reopen_stream

>>

>>  musl defines stdin/stdio/stderr as constant types which means

>>  we can not assign to them as we are doing here but works ok with glibc

>> @@ -13,15 +13,15 @@ http://git.alpinelinux.org/cgit/aports/tree/main/lvm2/fix-stdio-usage.patch

>>

>>  Signed-off-by: Khem Raj <raj.khem@gmail.com>

>>  Signed-off-by: Dengke Du <dengke.du@windriver.com>

>> ----

>> -Upstream-Status: Pending

>> +

>> +%% original patch: 0001-implement-libc-specific-reopen_stream.patch

>

> This chunk does not look as it was intended...

>


Yeah, devtool creation and I did git format-patch since I was squashing.

>>  ---

>>   lib/log/log.c      | 6 ++++++

>>   tools/lvmcmdline.c | 6 +++---

>>   2 files changed, 9 insertions(+), 3 deletions(-)

>>

>>  diff --git a/lib/log/log.c b/lib/log/log.c

>> -index c933154..638839d 100644

>> +index c933154..3581084 100644

>>  --- a/lib/log/log.c

>>  +++ b/lib/log/log.c

>>  @@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_

>> @@ -38,7 +38,7 @@ index c933154..638839d 100644

>>   }

>>  +#else

>>  +{

>> -+    return (freopen(NULL, mode, *stream) != NULL)

>> ++    return (freopen(NULL, mode, *stream) != NULL);

>>  +}

>>  +#endif

>>

>> @@ -76,5 +76,5 @@ index 9a4deb7..f1f18e6 100644

>>                      strerror(errno));

>>               return 0;

>>  --

>> -2.9.3

>> +2.12.0

>>

>> diff --git a/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch b/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch

>> index 5baafab3e..ef385099f 100644

>> --- a/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch

>> +++ b/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch

>> @@ -1,20 +1,20 @@

>> -From 8706a6d33753d8b2cf5bb2a12bd6880b371ce337 Mon Sep 17 00:00:00 2001

>> +From 3ae9c0b607ec33fb07f32a41e9d28cc9068dd39a Mon Sep 17 00:00:00 2001

>>  From: Dengke Du <dengke.du@windriver.com>

>>  Date: Tue, 25 Oct 2016 11:52:44 +0000

>> -Subject: [PATCH 2/4] Guard use of mallinfo() with __GLIBC__

>> +Subject: [PATCH] Guard use of mallinfo() with __GLIBC__

>>

>>  This API is glibc-only

>>

>>  Signed-off-by: Khem Raj <raj.khem@gmail.com>

>>  Signed-off-by: Dengke Du <dengke.du@windriver.com>

>> ----

>> -Upstream-Status: Pending

>> +

>> +%% original patch: 0002-Guard-use-of-mallinfo-with-__GLIBC__.patch

>

> Same here.

>

>>  ---

>>   lib/mm/memlock.c | 2 +-

>>   1 file changed, 1 insertion(+), 1 deletion(-)

>>

>>  diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c

>> -index da90144..c1bf8fb 100644

>> +index da90144..f34f890 100644

>>  --- a/lib/mm/memlock.c

>>  +++ b/lib/mm/memlock.c

>>  @@ -150,7 +150,7 @@ static void _touch_memory(void *mem, size_t size)

>> @@ -22,10 +22,10 @@ index da90144..c1bf8fb 100644

>>   static void _allocate_memory(void)

>>   {

>>  -#ifndef VALGRIND_POOL

>> -+#ifndef VALGRIND_POOL && defined(__GLIBC__)

>> ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__)

>>       void *stack_mem;

>>       struct rlimit limit;

>>       int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;

>>  --

>> -2.9.3

>> +2.12.0

>>

>> --

>> 2.12.1

>

> //Peter

>

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Khem Raj April 5, 2017, 5:17 p.m. UTC | #3
I have pushed a patch on top to remove it

https://github.com/kraj/meta-openembedded/commit/d7faf5fe8e9a4fc01e19fd5690496af47855fdcf

On Sat, Apr 1, 2017 at 8:20 AM, Khem Raj <raj.khem@gmail.com> wrote:
> On Fri, Mar 31, 2017 at 8:50 PM, Peter Kjellerstedt

> <peter.kjellerstedt@axis.com> wrote:

>>> -----Original Message-----

>>> From: openembedded-devel-bounces@lists.openembedded.org

>>> [mailto:openembedded-devel-bounces@lists.openembedded.org] On Behalf Of

>>> Khem Raj

>>> Sent: den 31 mars 2017 18:42

>>> To: openembedded-devel@lists.openembedded.org

>>> Subject: [oe] [meta-oe][PATCH 06/43] lvm2: Fix patch errors found with

>>> musl

>>>

>>> The patches had syntax errors which are only

>>> visible when using musl libs

>>>

>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>

>>> ---

>>>  .../lvm2/0001-implement-libc-specific-reopen_stream.patch  | 14 +++++++-------

>>>  .../lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch   | 14 +++++++-------

>>>  2 files changed, 14 insertions(+), 14 deletions(-)

>>>

>>> diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch b/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch

>>> index f09fd76b3..b6a7f1a92 100644

>>> --- a/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch

>>> +++ b/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch

>>> @@ -1,7 +1,7 @@

>>> -From ede7976da9431573b0104dbcfe91a32c02dbea13 Mon Sep 17 00:00:00 2001

>>> +From e3103459416616d3b8508e7176e897b0ae6c90f2 Mon Sep 17 00:00:00 2001

>>>  From: Dengke Du <dengke.du@windriver.com>

>>>  Date: Tue, 25 Oct 2016 11:49:40 +0000

>>> -Subject: [PATCH 1/4] implement libc specific reopen_stream

>>> +Subject: [PATCH] implement libc specific reopen_stream

>>>

>>>  musl defines stdin/stdio/stderr as constant types which means

>>>  we can not assign to them as we are doing here but works ok with glibc

>>> @@ -13,15 +13,15 @@ http://git.alpinelinux.org/cgit/aports/tree/main/lvm2/fix-stdio-usage.patch

>>>

>>>  Signed-off-by: Khem Raj <raj.khem@gmail.com>

>>>  Signed-off-by: Dengke Du <dengke.du@windriver.com>

>>> ----

>>> -Upstream-Status: Pending

>>> +

>>> +%% original patch: 0001-implement-libc-specific-reopen_stream.patch

>>

>> This chunk does not look as it was intended...

>>

>

> Yeah, devtool creation and I did git format-patch since I was squashing.

>

>>>  ---

>>>   lib/log/log.c      | 6 ++++++

>>>   tools/lvmcmdline.c | 6 +++---

>>>   2 files changed, 9 insertions(+), 3 deletions(-)

>>>

>>>  diff --git a/lib/log/log.c b/lib/log/log.c

>>> -index c933154..638839d 100644

>>> +index c933154..3581084 100644

>>>  --- a/lib/log/log.c

>>>  +++ b/lib/log/log.c

>>>  @@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_

>>> @@ -38,7 +38,7 @@ index c933154..638839d 100644

>>>   }

>>>  +#else

>>>  +{

>>> -+    return (freopen(NULL, mode, *stream) != NULL)

>>> ++    return (freopen(NULL, mode, *stream) != NULL);

>>>  +}

>>>  +#endif

>>>

>>> @@ -76,5 +76,5 @@ index 9a4deb7..f1f18e6 100644

>>>                      strerror(errno));

>>>               return 0;

>>>  --

>>> -2.9.3

>>> +2.12.0

>>>

>>> diff --git a/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch b/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch

>>> index 5baafab3e..ef385099f 100644

>>> --- a/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch

>>> +++ b/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch

>>> @@ -1,20 +1,20 @@

>>> -From 8706a6d33753d8b2cf5bb2a12bd6880b371ce337 Mon Sep 17 00:00:00 2001

>>> +From 3ae9c0b607ec33fb07f32a41e9d28cc9068dd39a Mon Sep 17 00:00:00 2001

>>>  From: Dengke Du <dengke.du@windriver.com>

>>>  Date: Tue, 25 Oct 2016 11:52:44 +0000

>>> -Subject: [PATCH 2/4] Guard use of mallinfo() with __GLIBC__

>>> +Subject: [PATCH] Guard use of mallinfo() with __GLIBC__

>>>

>>>  This API is glibc-only

>>>

>>>  Signed-off-by: Khem Raj <raj.khem@gmail.com>

>>>  Signed-off-by: Dengke Du <dengke.du@windriver.com>

>>> ----

>>> -Upstream-Status: Pending

>>> +

>>> +%% original patch: 0002-Guard-use-of-mallinfo-with-__GLIBC__.patch

>>

>> Same here.

>>

>>>  ---

>>>   lib/mm/memlock.c | 2 +-

>>>   1 file changed, 1 insertion(+), 1 deletion(-)

>>>

>>>  diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c

>>> -index da90144..c1bf8fb 100644

>>> +index da90144..f34f890 100644

>>>  --- a/lib/mm/memlock.c

>>>  +++ b/lib/mm/memlock.c

>>>  @@ -150,7 +150,7 @@ static void _touch_memory(void *mem, size_t size)

>>> @@ -22,10 +22,10 @@ index da90144..c1bf8fb 100644

>>>   static void _allocate_memory(void)

>>>   {

>>>  -#ifndef VALGRIND_POOL

>>> -+#ifndef VALGRIND_POOL && defined(__GLIBC__)

>>> ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__)

>>>       void *stack_mem;

>>>       struct rlimit limit;

>>>       int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;

>>>  --

>>> -2.9.3

>>> +2.12.0

>>>

>>> --

>>> 2.12.1

>>

>> //Peter

>>

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch b/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch
index f09fd76b3..b6a7f1a92 100644
--- a/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch
+++ b/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch
@@ -1,7 +1,7 @@ 
-From ede7976da9431573b0104dbcfe91a32c02dbea13 Mon Sep 17 00:00:00 2001
+From e3103459416616d3b8508e7176e897b0ae6c90f2 Mon Sep 17 00:00:00 2001
 From: Dengke Du <dengke.du@windriver.com>
 Date: Tue, 25 Oct 2016 11:49:40 +0000
-Subject: [PATCH 1/4] implement libc specific reopen_stream
+Subject: [PATCH] implement libc specific reopen_stream
 
 musl defines stdin/stdio/stderr as constant types which means
 we can not assign to them as we are doing here but works ok with glibc
@@ -13,15 +13,15 @@  http://git.alpinelinux.org/cgit/aports/tree/main/lvm2/fix-stdio-usage.patch
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
-Upstream-Status: Pending
+
+%% original patch: 0001-implement-libc-specific-reopen_stream.patch
 ---
  lib/log/log.c      | 6 ++++++
  tools/lvmcmdline.c | 6 +++---
  2 files changed, 9 insertions(+), 3 deletions(-)
 
 diff --git a/lib/log/log.c b/lib/log/log.c
-index c933154..638839d 100644
+index c933154..3581084 100644
 --- a/lib/log/log.c
 +++ b/lib/log/log.c
 @@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_
@@ -38,7 +38,7 @@  index c933154..638839d 100644
  }
 +#else
 +{
-+	return (freopen(NULL, mode, *stream) != NULL)
++	return (freopen(NULL, mode, *stream) != NULL);
 +}
 +#endif
  
@@ -76,5 +76,5 @@  index 9a4deb7..f1f18e6 100644
  		       strerror(errno));
  		return 0;
 -- 
-2.9.3
+2.12.0
 
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch b/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch
index 5baafab3e..ef385099f 100644
--- a/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch
+++ b/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch
@@ -1,20 +1,20 @@ 
-From 8706a6d33753d8b2cf5bb2a12bd6880b371ce337 Mon Sep 17 00:00:00 2001
+From 3ae9c0b607ec33fb07f32a41e9d28cc9068dd39a Mon Sep 17 00:00:00 2001
 From: Dengke Du <dengke.du@windriver.com>
 Date: Tue, 25 Oct 2016 11:52:44 +0000
-Subject: [PATCH 2/4] Guard use of mallinfo() with __GLIBC__
+Subject: [PATCH] Guard use of mallinfo() with __GLIBC__
 
 This API is glibc-only
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
-Upstream-Status: Pending
+
+%% original patch: 0002-Guard-use-of-mallinfo-with-__GLIBC__.patch
 ---
  lib/mm/memlock.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c
-index da90144..c1bf8fb 100644
+index da90144..f34f890 100644
 --- a/lib/mm/memlock.c
 +++ b/lib/mm/memlock.c
 @@ -150,7 +150,7 @@ static void _touch_memory(void *mem, size_t size)
@@ -22,10 +22,10 @@  index da90144..c1bf8fb 100644
  static void _allocate_memory(void)
  {
 -#ifndef VALGRIND_POOL
-+#ifndef VALGRIND_POOL && defined(__GLIBC__)
++#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
  	void *stack_mem;
  	struct rlimit limit;
  	int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
 -- 
-2.9.3
+2.12.0