From patchwork Mon Jul 6 11:45:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 6722261 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 030349F380 for ; Mon, 6 Jul 2015 11:41:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0275E204EA for ; Mon, 6 Jul 2015 11:41:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1E0A7206DB for ; Mon, 6 Jul 2015 11:41:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 09F946E723; Mon, 6 Jul 2015 04:41:33 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 82E4E6E723 for ; Mon, 6 Jul 2015 04:41:31 -0700 (PDT) Received: by wguu7 with SMTP id u7so137908681wgu.3 for ; Mon, 06 Jul 2015 04:41:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=dLDvDBQN7Q0OUSryTWl2ytejo8QMCxBuX2xmfsO0FQ8=; b=H7vtBOP3IkzFJ5zbvGQbkSHPUNbzwL7jzHKaH7yLO8x1YcizUleoxi6OyKzu0vSqVI gejyTaNYhlywT0blV8d6+SVXitx/o5t1lebJ7qHXw8xf2/rN7ah1W09uhbm/12dFyF4P 55FcGWoFVWln48/sk7yNm4K0xB1T4IyUxfEMbgtEz9QQIrvk64jY5esRV35rRNMj2Cg5 OvG6JO6bDnB/JL5FzisbLEdJRFM9ReGk3ynVn9b2e+GskCR7KSbohalRtLE+3edlinAc nseWo94hF4IavjB+U1aV9l+k69RViYMTjBQqESr/wxvQ/Zy2IBPcDmtBD+alBnCCM6H2 vyUQ== X-Received: by 10.180.206.33 with SMTP id ll1mr89935975wic.91.1436182890027; Mon, 06 Jul 2015 04:41:30 -0700 (PDT) Received: from arch-x220.localdomain (cpc12-croy20-2-0-cust52.croy.cable.virginm.net. [82.44.54.53]) by mx.google.com with ESMTPSA id q9sm46798332wiz.23.2015.07.06.04.41.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Jul 2015 04:41:29 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] Fix headers inclusion in xf86drmMode.c Date: Mon, 6 Jul 2015 12:45:31 +0100 Message-Id: <1436183131-13698-1-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.4.5 MIME-Version: 1.0 Cc: emil.l.velikov@gmail.com, Julien Cristau X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY,URIBL_BLACK autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Julien Cristau Add sys/sysctl.h to get sysctlbyname declaration on kFreeBSD Updated by Thorsten “mirabilos” Glaser to add autoconf check and only include if it is detected by configure as it’s unusable on Linux/x32 (and others, e.g. other new architectures). --- A trivial patch picked up from the Debian guys. Julien, hope you don't mind :-) -Emil configure.ac | 2 +- xf86drmMode.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 001fd3d..2cf9a19 100644 --- a/configure.ac +++ b/configure.ac @@ -53,7 +53,7 @@ AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_FUNC_ALLOCA -AC_CHECK_HEADERS([sys/mkdev.h]) +AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h]) # Initialize libtool LT_PREREQ([2.2]) diff --git a/xf86drmMode.c b/xf86drmMode.c index f4b8d14..529429e 100644 --- a/xf86drmMode.c +++ b/xf86drmMode.c @@ -46,6 +46,9 @@ #include #include #include +#ifdef HAVE_SYS_SYSCTL_H +#include +#endif #include #include