The prlimit() appeared kernel in 2.6.36 at October 2010, and to glic in 2.13 at February 2011. Signed-off-by: Sami Kerola <kerolasa@xxxxxx> --- configure.ac | 3 +++ sys-utils/Makefile.am | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 873f1b2..f2e257f 100644 --- a/configure.ac +++ b/configure.ac @@ -227,6 +227,9 @@ AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no]) AC_CHECK_FUNCS([ioperm iopl], [have_io=yes]) AM_CONDITIONAL([BUILD_HWCLOCK], test "x$have_io" = xyes -o "x$linux_os" = xyes) +AC_CHECK_FUNCS([prlimit], [have_prlimit=yes]) +AM_CONDITIONAL([BUILD_PRLIMIT], test "x$have_prlimit" = xyes) + AC_CHECK_MEMBER(struct sockaddr.sa_len, AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),, [#include <sys/types.h> diff --git a/sys-utils/Makefile.am b/sys-utils/Makefile.am index 48595da..39b064c 100644 --- a/sys-utils/Makefile.am +++ b/sys-utils/Makefile.am @@ -2,11 +2,11 @@ include $(top_srcdir)/config/include-Makefile.am bin_PROGRAMS = sbin_PROGRAMS = -usrbin_exec_PROGRAMS = flock ipcrm ipcs ipcmk renice setsid prlimit +usrbin_exec_PROGRAMS = flock ipcrm ipcs ipcmk renice setsid usrsbin_exec_PROGRAMS = readprofile dist_man_MANS = flock.1 ipcrm.1 ipcs.1 ipcmk.1 renice.1 setsid.1 \ - readprofile.8 prlimit.1 + readprofile.8 if LINUX bin_PROGRAMS += dmesg @@ -41,9 +41,14 @@ dmesg_SOURCES = dmesg.c $(top_srcdir)/lib/strutils.c ipcmk_SOURCES = ipcmk.c $(top_srcdir)/lib/strutils.c ipcrm_SOURCES = ipcrm.c $(top_srcdir)/lib/strutils.c flock_SOURCES = flock.c $(top_srcdir)/lib/strutils.c + +if BUILD_PRLIMIT +usrbin_exec_PROGRAMS += prlimit +dist_man_MANS += prlimit.1 prlimit_SOURCES = prlimit.c $(top_srcdir)/lib/strutils.c \ $(top_srcdir)/lib/mbsalign.c \ $(top_srcdir)/lib/tt.c +endif if BUILD_MOUNTPOINT bin_PROGRAMS += mountpoint -- 1.7.7 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html