From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57]) by gabe.freedesktop.org (Postfix) with ESMTPS id BE77110E835 for ; Thu, 26 Oct 2023 17:14:43 +0000 (UTC) Received: from fli4l.lan.fli4l (p4fd6ced1.dip0.t-ipconnect.de [79.214.206.209]) by dd20012.kasserver.com (Postfix) with ESMTPSA id B84E7A4C1143 for ; Thu, 26 Oct 2023 19:14:41 +0200 (CEST) Received: from bruckner.lan.fli4l ([192.168.1.1]:58180) by fli4l.lan.fli4l with esmtp (Exim 4.96.2) (envelope-from ) id 1qw3wO-0002zh-3C for igt-dev@lists.freedesktop.org; Thu, 26 Oct 2023 19:14:41 +0200 From: Bernd Kuhls To: igt-dev@lists.freedesktop.org Date: Thu, 26 Oct 2023 19:14:35 +0200 Message-Id: <20231026171440.4046190-2-bernd@kuhls.net> In-Reply-To: <20231026171440.4046190-1-bernd@kuhls.net> References: <20231026171440.4046190-1-bernd@kuhls.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH v2 1/6] build: check that outb is present in io.h List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: With glibc if io.h exists, inb/outb are always defined. However on musl, io.h always exists but it may not define inb/outb. Thus, igt-gpu-tools builds with musl on non-x86 platforms will fail to link. Fix this by checking for both io.h and that outb() is defined. Signed-off-by: Bernd Kuhls --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index b35a00faa..cee8a7446 100644 --- a/meson.build +++ b/meson.build @@ -220,7 +220,7 @@ endif if cc.has_header('libgen.h') config.set('HAVE_LIBGEN_H', 1) endif -if cc.has_header('sys/io.h') +if cc.has_header('sys/io.h') and cc.has_function('outb', prefix: '#include ') config.set('HAVE_SYS_IO_H', 1) endif if cc.links(''' -- 2.39.2