]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
autotools: handle getgrgid_r on bionic 2870/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 20 Feb 2019 17:38:07 +0000 (18:38 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 20 Feb 2019 18:20:24 +0000 (19:20 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
configure.ac
src/lxc/Makefile.am
src/lxc/conf.c

index 4fc3932354c9c7ee355f07e37a990070873dabef..dadc29aaf40d24d9e5cefd9ac8eb3365b2b6ec9b 100644 (file)
@@ -665,11 +665,7 @@ AC_CHECK_LIB(pthread, main)
 AC_CHECK_FUNCS(pthread_atfork)
 AC_CHECK_FUNCS(statvfs)
 AC_CHECK_LIB(util, openpty)
-AC_CHECK_FUNCS([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([getgrgid_r openpty hasmntopt setmntent endmntent utmpxname])
 AC_CHECK_FUNCS([getline],
        AM_CONDITIONAL(HAVE_GETLINE, true)
        AC_DEFINE(HAVE_GETLINE,1,[Have getline]),
index d86d2e58f3f241690cf196ae62aacf8888f1b716..fe6c0b7da7084e4990b6979e3beb70caa1230da1 100644 (file)
@@ -44,6 +44,7 @@ noinst_HEADERS = \
 if IS_BIONIC
 noinst_HEADERS += \
        ../include/fexecve.h \
+       ../include/getgrgid_r.h \
        ../include/ifaddrs.h \
        ../include/openpty.h \
        ../include/lxcmntent.h
@@ -59,10 +60,6 @@ if !HAVE_GETSUBOPT
 noinst_HEADERS += ../include/getsubopt.h
 endif
 
-if !HAVE_GETGRGID_R
-noinst_HEADERS += ../include/getgrgid_r.h
-endif
-
 sodir=$(libdir)
 
 LSM_SOURCES = \
@@ -142,6 +139,7 @@ endif
 if IS_BIONIC
 liblxc_la_SOURCES += \
        ../include/fexecve.c ../include/fexecve.h \
+       ../include/getgrgid_r.c ../include/getgrgid_r.h \
        ../include/ifaddrs.c ../include/ifaddrs.h \
        ../include/openpty.c ../include/openpty.h \
        ../include/lxcmntent.c ../include/lxcmntent.h
@@ -326,10 +324,6 @@ if !HAVE_STRLCAT
 init_lxc_static_SOURCES += ../include/strlcat.c ../include/strlcat.h
 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_LDADD = @CAP_LIBS@
 init_lxc_static_CFLAGS = $(AM_CFLAGS) -DNO_LXC_CONF
index 5d8090703d77c94f79c01be8241db4eafe8ce0ae..f1414611f05b5aefd0bac055f50e929f3181c057 100644 (file)
 #include "utils.h"
 #include "lsm/lsm.h"
 
+#if !HAVE_GETGRGID_R
+#include "../include/getgrgid_r.h"
+#endif
+
 #if HAVE_LIBCAP
 #include <sys/capability.h>
 #endif