From mboxrd@z Thu Jan 1 00:00:00 1970 From: c.briere@samsung.com (Charles Briere) Date: Mon, 27 Oct 2014 20:49:29 +0000 Subject: [lttng-dev] [PATCH lttng-tools 12/24] Add : Compatibility layer for ulimit.h In-Reply-To: <1414442926-14381-1-git-send-email-c.briere@samsung.com> References: <1414442926-14381-1-git-send-email-c.briere@samsung.com> Message-ID: <1414442926-14381-13-git-send-email-c.briere@samsung.com> From: Charles Briere Signed-off-by: Charles Briere --- configure.ac | 1 + src/bin/lttng-consumerd/health-consumerd.c | 2 +- src/bin/lttng-consumerd/lttng-consumerd.c | 2 +- src/bin/lttng-relayd/health-relayd.c | 2 +- src/common/compat/ulimit.h | 29 +++++++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 src/common/compat/ulimit.h diff --git a/configure.ac b/configure.ac index 3b880c9..fc08cc6 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,7 @@ AC_CHECK_HEADERS([ \ sys/types.h unistd.h fcntl.h string.h pthread.h limits.h \ signal.h stdlib.h sys/un.h sys/socket.h stdlib.h stdio.h \ getopt.h sys/ipc.h sys/shm.h popt.h grp.h syscall.h \ + ulimit.h \ ],[], [AC_CHECK_HEADERS([sys/syscall.h])] ) diff --git a/src/bin/lttng-consumerd/health-consumerd.c b/src/bin/lttng-consumerd/health-consumerd.c index 079a14b..3af18e7 100644 --- a/src/bin/lttng-consumerd/health-consumerd.c +++ b/src/bin/lttng-consumerd/health-consumerd.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -46,6 +45,7 @@ #include #include #include +#include #include #include diff --git a/src/bin/lttng-consumerd/lttng-consumerd.c b/src/bin/lttng-consumerd/lttng-consumerd.c index bdd8ddc..f1bd287 100644 --- a/src/bin/lttng-consumerd/lttng-consumerd.c +++ b/src/bin/lttng-consumerd/lttng-consumerd.c @@ -39,13 +39,13 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c index 3a5cc90..312edd5 100644 --- a/src/bin/lttng-relayd/health-relayd.c +++ b/src/bin/lttng-relayd/health-relayd.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -46,6 +45,7 @@ #include #include #include +#include #include #include diff --git a/src/common/compat/ulimit.h b/src/common/compat/ulimit.h new file mode 100644 index 0000000..1140c99 --- /dev/null +++ b/src/common/compat/ulimit.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2014 - Charles Briere + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2 only, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef _COMPAT_ULIMIT_H +#define _COMPAT_ULIMIT_H + +#include + +# ifdef HAVE_ULIMIT +# include +# else + +# endif /* HAVE_ULIMIT */ + +#endif /*_COMPAT_ULIMIT_H */ -- 2.1.2