From patchwork Mon Sep 9 23:51:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alan Coopersmith X-Patchwork-Id: 11138599 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C180F1599 for ; Mon, 9 Sep 2019 23:51:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E89120674 for ; Mon, 9 Sep 2019 23:51:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E89120674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34C3D89C03; Mon, 9 Sep 2019 23:51:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5D72489C03 for ; Mon, 9 Sep 2019 23:51:27 +0000 (UTC) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x89NnAlk175042 for ; Mon, 9 Sep 2019 23:51:25 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2uw1jxykfq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 09 Sep 2019 23:51:25 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x89NnVkq182133 for ; Mon, 9 Sep 2019 23:51:24 GMT Received: from also.us.oracle.com (also.us.oracle.com [10.132.94.46]) by userp3030.oracle.com with ESMTP id 2uwqqd2f5v-1 for ; Mon, 09 Sep 2019 23:51:24 +0000 From: Alan Coopersmith To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] meson: Fix sys/mkdev.h detection on Solaris Date: Mon, 9 Sep 2019 16:51:16 -0700 Message-Id: <20190909235116.19290-1-alan.coopersmith@oracle.com> X-Mailer: git-send-email 2.15.2 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9375 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1909090224 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9375 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1909090224 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=f35fFGS9WGa0cJr/aBa8q/ZNAKpAEY/kt4cJNB8FlEE=; b=mtXvqjNEXeD8YumhdNYwfv1hky8qassN29JZAiB6dyLD9YkvT8zGpoHqk9zYuStVfTfR BMcniUjtYPg0oTxPtWHAdQJ2SEp3RpXmkaEMTt3Og18dOnIMSt9DNN1CrlkW9oTGById YbcxDNPUjN/n/vf+IDVyIqZhtw4Yj/1zmYIewx4H2bqfmgQpfnCUwboqJ62V0zMK1mcK bgYwRZV2jX9DbUk7rWPXYw0yTTu4MdurZXWHdn6WujRs2JA4sO6AbLhmv2SUCF+U+uBA 5e4r7DhIDhWiOnm0Nw+9y5jC1AuEzQKZPFv8Y6U0MeJlHu0dnfrACbTxY3F502q13oMK bg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 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" On Solaris, sys/sysmacros.h has long-deprecated copies of major() & minor() but not makedev(). sys/mkdev.h has all three and is the preferred choice. So we check for sys/mkdev.h first, as autoconf's AC_HEADER_MAJOR does. Fixes build failure with error: ../xf86drm.c: In function ‘drmOpenMinor’: ../xf86drm.c:454:30: error: implicit declaration of function ‘makedev’ [-Werror=implicit-function-declaration] 454 | return drmOpenDevice(makedev(DRM_MAJOR, minor), minor, type); | ^~~~~~~ Signed-off-by: Alan Coopersmith Reviewed-by: Eric Engestrom Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index bc5cfc58..a3363c32 100644 --- a/meson.build +++ b/meson.build @@ -183,10 +183,10 @@ foreach header : ['sys/sysctl.h', 'sys/select.h', 'alloca.h'] config.set('HAVE_' + header.underscorify().to_upper(), cc.compiles('#include <@0@>'.format(header), name : '@0@ works'.format(header))) endforeach -if cc.has_header_symbol('sys/sysmacros.h', 'major') - config.set10('MAJOR_IN_SYSMACROS', true) -elif cc.has_header_symbol('sys/mkdev.h', 'major') +if cc.has_header_symbol('sys/mkdev.h', 'major') config.set10('MAJOR_IN_MKDEV', true) +elif cc.has_header_symbol('sys/sysmacros.h', 'major') + config.set10('MAJOR_IN_SYSMACROS', true) endif config.set10('HAVE_OPEN_MEMSTREAM', cc.has_function('open_memstream'))