Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001AbbFYX3v (ORCPT ); Thu, 25 Jun 2015 19:29:51 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:33074 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751551AbbFYX3n (ORCPT ); Thu, 25 Jun 2015 19:29:43 -0400 From: Vinson Lee To: Shuah Khan , David Drysdale , Andrew Morton , Geert Uytterhoeven , Michael Ellerman Cc: linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Vinson Lee Subject: [PATCH] selftests/exec: Fix build on older distros. Date: Thu, 25 Jun 2015 16:29:08 -0700 Message-Id: <1435274950-17106-1-git-send-email-vlee@twopensource.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1664 Lines: 48 From: Vinson Lee This patch fixes this build error on CentOS 5. execveat.c: In function ‘check_execveat_pathmax’: execveat.c:185: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function) execveat.c:185: error: (Each undeclared identifier is reported only once execveat.c:185: error: for each function it appears in.) execveat.c: In function ‘run_tests’: execveat.c:221: error: ‘O_PATH’ undeclared (first use in this function) execveat.c:222: error: ‘O_CLOEXEC’ undeclared (first use in this function) execveat.c:258: error: ‘AT_EMPTY_PATH’ undeclared (first use in this function) Cc: stable@vger.kernel.org # 3.19+ Signed-off-by: Vinson Lee --- tools/testing/selftests/exec/execveat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/testing/selftests/exec/execveat.c b/tools/testing/selftests/exec/execveat.c index 8d5d1d2..170148d 100644 --- a/tools/testing/selftests/exec/execveat.c +++ b/tools/testing/selftests/exec/execveat.c @@ -20,6 +20,16 @@ #include #include +#ifndef AT_EMPTY_PATH +# define AT_EMPTY_PATH 0x1000 +#endif +#ifndef O_PATH +# define O_PATH 010000000 +#endif +#ifndef O_CLOEXEC +# define O_CLOEXEC 02000000 +#endif + static char longpath[2 * PATH_MAX] = ""; static char *envp[] = { "IN_TEST=yes", NULL, NULL }; static char *argv[] = { "execveat", "99", NULL }; -- 1.8.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/