Unverified Commit 2907ebbb by Stéphane Graber Committed by GitHub

Merge pull request #2870 from brauner/2019-02-20/fix_stable-2.0

autotools: handle getgrgid_r on bionic
parents 0c03b4eb e31ee985
...@@ -665,11 +665,7 @@ AC_CHECK_LIB(pthread, main) ...@@ -665,11 +665,7 @@ AC_CHECK_LIB(pthread, main)
AC_CHECK_FUNCS(pthread_atfork) AC_CHECK_FUNCS(pthread_atfork)
AC_CHECK_FUNCS(statvfs) AC_CHECK_FUNCS(statvfs)
AC_CHECK_LIB(util, openpty) AC_CHECK_LIB(util, openpty)
AC_CHECK_FUNCS([openpty hasmntopt setmntent endmntent utmpxname]) AC_CHECK_FUNCS([getgrgid_r openpty hasmntopt setmntent endmntent utmpxname])
AC_CHECK_FUNCS([getgrgid_r],
AM_CONDITIONAL(HAVE_GETGRGID_R, true)
AC_DEFINE(HAVE_GETGRGID_R,1,[Have getgrgid_r]),
AM_CONDITIONAL(HAVE_GETGRGID_R, false))
AC_CHECK_FUNCS([getline], AC_CHECK_FUNCS([getline],
AM_CONDITIONAL(HAVE_GETLINE, true) AM_CONDITIONAL(HAVE_GETLINE, true)
AC_DEFINE(HAVE_GETLINE,1,[Have getline]), AC_DEFINE(HAVE_GETLINE,1,[Have getline]),
......
...@@ -44,6 +44,7 @@ noinst_HEADERS = \ ...@@ -44,6 +44,7 @@ noinst_HEADERS = \
if IS_BIONIC if IS_BIONIC
noinst_HEADERS += \ noinst_HEADERS += \
../include/fexecve.h \ ../include/fexecve.h \
../include/getgrgid_r.h \
../include/ifaddrs.h \ ../include/ifaddrs.h \
../include/openpty.h \ ../include/openpty.h \
../include/lxcmntent.h ../include/lxcmntent.h
...@@ -59,10 +60,6 @@ if !HAVE_GETSUBOPT ...@@ -59,10 +60,6 @@ if !HAVE_GETSUBOPT
noinst_HEADERS += ../include/getsubopt.h noinst_HEADERS += ../include/getsubopt.h
endif endif
if !HAVE_GETGRGID_R
noinst_HEADERS += ../include/getgrgid_r.h
endif
sodir=$(libdir) sodir=$(libdir)
LSM_SOURCES = \ LSM_SOURCES = \
...@@ -142,6 +139,7 @@ endif ...@@ -142,6 +139,7 @@ endif
if IS_BIONIC if IS_BIONIC
liblxc_la_SOURCES += \ liblxc_la_SOURCES += \
../include/fexecve.c ../include/fexecve.h \ ../include/fexecve.c ../include/fexecve.h \
../include/getgrgid_r.c ../include/getgrgid_r.h \
../include/ifaddrs.c ../include/ifaddrs.h \ ../include/ifaddrs.c ../include/ifaddrs.h \
../include/openpty.c ../include/openpty.h \ ../include/openpty.c ../include/openpty.h \
../include/lxcmntent.c ../include/lxcmntent.h ../include/lxcmntent.c ../include/lxcmntent.h
...@@ -326,10 +324,6 @@ if !HAVE_STRLCAT ...@@ -326,10 +324,6 @@ if !HAVE_STRLCAT
init_lxc_static_SOURCES += ../include/strlcat.c ../include/strlcat.h init_lxc_static_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif endif
if !HAVE_GETGRGID_R
liblxc_la_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
init_lxc_static_LDFLAGS = -all-static init_lxc_static_LDFLAGS = -all-static
init_lxc_static_LDADD = @CAP_LIBS@ init_lxc_static_LDADD = @CAP_LIBS@
init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
......
...@@ -88,6 +88,10 @@ ...@@ -88,6 +88,10 @@
#include "utils.h" #include "utils.h"
#include "lsm/lsm.h" #include "lsm/lsm.h"
#if !HAVE_GETGRGID_R
#include "../include/getgrgid_r.h"
#endif
#if HAVE_LIBCAP #if HAVE_LIBCAP
#include <sys/capability.h> #include <sys/capability.h>
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment