Skip to contentSkip to conversation

Add missing <strings.h> includes

PATCH In review Greg Hackmann 3 participants 5 messages Apr 16, 2015 – Apr 27, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add missing <strings.h> includes

A couple of files use ffs() without explicitly including strings.h. Some systems will pull in ffs()'s declaration through another header anyway, but not when compiling against bionic in AOSP master.

---
 nouveau/nouveau.c         | 1 +
 tests/modetest/modetest.c | 1 +
 2 files changed, 2 insertions(+)
nouveau/nouveau.c +1 -0
index 2d95b74..22e0f80 100644
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <string.h>
+#include <strings.h>
 #include <stdbool.h>
 #include <assert.h>
 #include <errno.h>
tests/modetest/modetest.c +1 -0
index 53dfe05..63d2059 100644
@@ -50,6 +50,7 @@
 #include <inttypes.h>
 #include <unistd.h>
 #include <string.h>
+#include <strings.h>
 #include <errno.h>
 #include <sys/poll.h>
 #include <sys/time.h>
Signature · 6 lines
2.2.0.rc0.207.ga3a616c

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

Hi Greg,

Quoted 5 lines · Greg Hackmann

A couple of files use ffs() without explicitly including strings.h. Some systems will pull in ffs()'s declaration through another header anyway, but not when compiling against bionic in AOSP master.

Thanks for the patch.

I'm not sure why I haven't hit this while building with Android-x86's bionic, although it's the right thing to do.

I will give it a few days more for anyone to comment and I'll push it.

From a quick look I cannot see libdrm in the AOSP build. Are you experimenting with a libdrm based hwcompositor again :-)

Cheers
Emil

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 3 lines · Emil Velikov

I'm not sure why I haven't hit this while building with Android-x86's bionic, although it's the right thing to do.

Maybe a difference in bionic versions? I know the bionic team made some recent (post-5.1) changes that unintentionally exposed a handful of other missing #includes in our tree.

Quoted 2 lines

From a quick look I cannot see libdrm in the AOSP build. Are you experimenting with a libdrm based hwcompositor again :-)

Yeah. That's where I want to end up in the long term, anyway. I've said publicly that we'd eventually like to converge with upstream on this, and I still mean it. :)
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
Quoted 9 lines · Greg Hackmann
Quoted 3 lines · Emil Velikov

I'm not sure why I haven't hit this while building with Android-x86's bionic, although it's the right thing to do.

Maybe a difference in bionic versions? I know the bionic team made some recent (post-5.1) changes that unintentionally exposed a handful of other missing #includes in our tree.

Could be. I've never really bothered checking the bionic (both downstream patches and version) that Android-x86 uses.

Quoted 7 lines
Quoted 2 lines

From a quick look I cannot see libdrm in the AOSP build. Are you experimenting with a libdrm based hwcompositor again :-)

Yeah. That's where I want to end up in the long term, anyway. I've said publicly that we'd eventually like to converge with upstream on this, and I still mean it. :)

Great glad to hear. We have a GSoC student that is working on it this summer, so things might be closer than expected.

May I suggest that you ping/send patches to the list early and often. There is a lot of traffic, and most people are busy with their own hardware so patches do get missed/forgotten.

Another good idea is to pop over at #dri-devel at FreeNode, and have a chat with the guys in real time - someone might be able to find a solution/steer you in the right direction :-)

Cheers,
Emil

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

2015-04-24 0:56 GMT+08:00 Emil Velikov <[email protected]>:

Quoted 6 lines · Greg Hackmann
Quoted 5 lines · Emil Velikov
Quoted 3 lines

I'm not sure why I haven't hit this while building with Android-x86's bionic, although it's the right thing to do.

Quoted 6 lines
Quoted 4 lines

Maybe a difference in bionic versions? I know the bionic team made some recent (post-5.1) changes that unintentionally exposed a handful of other missing #includes in our tree.

Could be. I've never really bothered checking the bionic (both downstream patches and version) that Android-x86 uses.

Each Android-x86 branch is based on the respective AOSP stable release.
That means bionic of kitkat-x86 is based on ASOSP kitkat-mr2.2, while lollipop-x86 is based on the lollipop-mr1 release.
It may be different than the AOSP master branch.
_______________________________________________
dri-devel mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel