Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755165AbbHFIWk (ORCPT ); Thu, 6 Aug 2015 04:22:40 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:34365 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754988AbbHFIWD (ORCPT ); Thu, 6 Aug 2015 04:22:03 -0400 From: David Herrmann To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Daniel Mack , Djalal Harouni , David Herrmann Subject: [PATCH 8/9] kdbus/samples: skip if __NR_memfd_create is not defined Date: Thu, 6 Aug 2015 10:21:27 +0200 Message-Id: <1438849288-18112-9-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1438849288-18112-1-git-send-email-dh.herrmann@gmail.com> References: <1438849288-18112-1-git-send-email-dh.herrmann@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1359 Lines: 43 We require __NR_memfd_create for the kdbus samples. Make sure we skip compilation if the target architecture and kernel do not support memfds. Reported-by: Paul Gortmaker Reviewed-by: Daniel Mack Signed-off-by: David Herrmann --- samples/kdbus/kdbus-workers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/kdbus/kdbus-workers.c b/samples/kdbus/kdbus-workers.c index c3ba958..5a6dfdc 100644 --- a/samples/kdbus/kdbus-workers.c +++ b/samples/kdbus/kdbus-workers.c @@ -59,9 +59,11 @@ #include #include +#include /* glibc < 2.7 does not ship sys/signalfd.h */ -#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 7 +/* we require kernels with __NR_memfd_create */ +#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 7 && defined(__NR_memfd_create) #include #include @@ -75,7 +77,6 @@ #include #include #include -#include #include #include #include -- 2.5.0 -- 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/