[lxc-devel] [PATCH 00/21] Enable building with bionic (Android C library)
Stéphane Graber
stgraber at ubuntu.com
Thu Jan 3 17:24:01 UTC 2013
The following changes allow for LXC to be built on bionic using the
Android NDK.
The code has been test built with both eglibc and bionic and builds cleanly.
I unfortunately can't test the resulting Android binaries myself, so hopefully
someone can.
Quite a few of those changes is simple detection of missing functions and
updates to LXC to avoid using those features (capability, personality).
Some compatibility code was also added for openpty and mntent, those files are
based on the eglibc implementation of those functions and are only used when on
a libc implementation that doesn't have those functions.
This also does a bit of cleaning up of configure.ac.
Stéphane Graber (21):
configure.ac: Add code to detect bionic C library
configure.ac: Cleanup, comments, indent, ...
Replace all reference to ushort by unsigned short
Support both getline and fgetln
No need to link against rt and util on bionic
Replace get_current_dir_name by getcwd
Add/remove extra includes
conf.c: Define LO_FLAGS_AUTOCLEAR if it's not
clone: Support bionic's clone() defintion
tty.h: Ship our own minimal openpty.h
Don't hard depend on capability.h and libcap
personality.h: Make the personality code optional
Workaround missing functions in other libc
Make utmpx.h optional
Add a bionic_alphasort function on bionic
Replace strdupa call by standard strdup
caps.h: Rename __errno to ___errno
Add local implementation of mntent.h
conf.c: Cleanup __S_ISTYPE
lxc_unshare: Replace getpw*_r by getpw*
utmp.c: Avoid duplicate definition of __USE_GNU
configure.ac | 153 +++++++++++++++++++++++++++++---------------------
src/include/mntent.c | 49 ++++++++++++++++
src/include/mntent.h | 18 ++++++
src/include/openpty.c | 72 ++++++++++++++++++++++++
src/include/openpty.h | 14 +++++
src/lxc/Makefile.am | 24 +++++++-
src/lxc/attach.c | 31 ++++++++--
src/lxc/caps.c | 6 +-
src/lxc/caps.h | 36 ++++++++++--
src/lxc/cgroup.c | 12 ++++
src/lxc/conf.c | 72 ++++++++++++++++++++++--
src/lxc/conf.h | 5 +-
src/lxc/confile.c | 31 ++++++++--
src/lxc/confile.h | 2 +
src/lxc/console.c | 10 +++-
src/lxc/lxc_attach.c | 10 +++-
src/lxc/lxc_unshare.c | 15 ++---
src/lxc/lxclock.c | 1 +
src/lxc/namespace.c | 1 -
src/lxc/namespace.h | 9 ++-
src/lxc/network.c | 2 +-
src/lxc/network.h | 2 +-
src/lxc/nl.c | 2 +-
src/lxc/nl.h | 2 +-
src/lxc/parse.c | 20 +++++++
src/lxc/start.c | 18 +++++-
src/lxc/stop.c | 2 +-
src/lxc/utils.c | 2 +-
src/lxc/utils.h | 2 +-
src/lxc/utmp.c | 9 +++
src/lxc/utmp.h | 9 +++
31 files changed, 530 insertions(+), 111 deletions(-)
create mode 100644 src/include/mntent.c
create mode 100644 src/include/mntent.h
create mode 100644 src/include/openpty.c
create mode 100644 src/include/openpty.h
--
1.8.0
More information about the lxc-devel
mailing list