From patchwork Wed Jan 20 03:34:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kylie McClain X-Patchwork-Id: 8070161 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 BA5E89F440 for ; Wed, 20 Jan 2016 09:20:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD833203AC for ; Wed, 20 Jan 2016 09:20:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E0F4F203DC for ; Wed, 20 Jan 2016 09:20:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4095E6E44D; Wed, 20 Jan 2016 01:20:39 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by gabe.freedesktop.org (Postfix) with ESMTPS id 974E789DC7 for ; Tue, 19 Jan 2016 19:35:31 -0800 (PST) Received: by mail-ob0-f178.google.com with SMTP id py5so236778928obc.2 for ; Tue, 19 Jan 2016 19:35:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=ZoOXk2Om54wId7ogAuq3ZhhDDLW92j1n8yZbSd70HdM=; b=OVBkbmROpd5YHjLLr/0GVLTm+jFg61usQHclOhoJI3zGXfoOhPcwk8RktfgekzX+Mk 2Ndn3gNnRkcqkUl0jpc9bD2zPobwfXVvNQW4CJfnxeQzn26XWjI1cXR/KtenX9B2bvc+ sRPSMI79n8cXQ6aW4HoQ1nuBUEslyEH2u6Tu4bdCQSsADZo4C6KncVhcWDwzJCVWtu8U 6lBCMyy2WupA5PZTPQXw+HdZtG1ofzsS2T00MWfTt+mYxHurIU7/Z6E57UZgYczAlFnD BTrITD89YIVmbpdIcXAwPY232n9mLeDrrle2dA9FNVhDvPZD5mhltO0lFB8j9Ae1odG4 mVCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc :content-type; bh=ZoOXk2Om54wId7ogAuq3ZhhDDLW92j1n8yZbSd70HdM=; b=l6YNk4A8sJfaIZFejlPydIlWmMY9ZLiTEcgtfK2UcA/yjg5pduhJxHCMP1rF1xTNR0 4bnKb/YUZ51rX1ufQeOMcPv0ICpGz8EPuDkZwoQfO4Z1wsC7BpmyDx+NMiLOuDs/kahC UBvllPAEhtE8sJ5TJc34a/2TZFdzex1HVgebj0AQPmdhd5S7BHdy1dAgPHJu+B3Ms9TI yLWSprm975UvJVbT2HjG2jtrgBTUCGVrwNrtEhGPYAb2Z8mf5RS5WEkbfn05i9GjkvMx ZKvKLB2sjnZatkanqhywHCDjic45Mey6Y7w+jSQ9YL/igNx13+EaM2Q4IHhqafUtRn9W zoxw== X-Gm-Message-State: ALoCoQkcMkoZReMAGv7SmI7c+8rGQhSp2EigxOWEfQhPZZ+e+t3xfZWdC6CxwdZ0qbSRB97t8/Djni1Wjjt5OUzOVTqBMts/0A== X-Received: by 10.60.220.230 with SMTP id pz6mr27117975oec.49.1453260930783; Tue, 19 Jan 2016 19:35:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.204.37 with HTTP; Tue, 19 Jan 2016 19:34:51 -0800 (PST) From: Kylie McClain Date: Tue, 19 Jan 2016 22:34:51 -0500 Message-ID: Subject: [PATCH] Fix building on musl-libc To: dri-devel@lists.freedesktop.org X-Mailman-Approved-At: Wed, 20 Jan 2016 01:20:32 -0800 Cc: emil.l.velikov@gmail.com 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=-4.1 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 autolearn=unavailable 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 libdrm git master fails to compile due to undefined functions/constants on musl libc. The attached patches fix it. (I've attached them rather than included them in the message since gmail is really bad about ruining patch formatting.) I originally posted these to https://bugs.freedesktop.org/show_bug.cgi?id=93764 in a different form, and have modified them to Emil's comments on the bugzilla entry. commit 6ec5d220184e46135109923d252ae619068b7eb2 Author: Kylie McClain Date: Tue Jan 19 22:27:28 2016 -0500 tests: Include poll.h rather than sys/poll.h sys/poll.h is a non-standard location of the poll.h header, and is incorrect on non-glibc libcs. poll.h, however, is defined in SUS (v2) and is more portable. http://pubs.opengroup.org/onlinepubs/007908799/xsh/poll.h.html commit 6e7f12f1977bd13d10d99bc7826c54b692284c38 Author: Kylie McClain Date: Tue Jan 19 22:24:15 2016 -0500 kms-steal-crtc: Make use of sys/select.h if available On systems using musl libc, FD_ZERO, FD_SET, select, etc. are defined in sys/select.h. This behavior is defined in IEEE Std 1003.1, 2000, http://pubs.opengroup.org/onlinepubs/009696899/basedefs/sys/select.h.html and fixes building kms-steal-crtc on musl libc systems. From 6ec5d220184e46135109923d252ae619068b7eb2 Mon Sep 17 00:00:00 2001 From: Kylie McClain Date: Tue, 19 Jan 2016 22:27:28 -0500 Subject: [PATCH 2/2] tests: Include poll.h rather than sys/poll.h sys/poll.h is a non-standard location of the poll.h header, and is incorrect on non-glibc libcs. poll.h, however, is defined in SUS (v2) and is more portable. http://pubs.opengroup.org/onlinepubs/007908799/xsh/poll.h.html --- tests/modetest/modetest.c | 2 +- tests/vbltest/vbltest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index 22e3e81..375b64a 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include "xf86drm.h" diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c index 1833321..a4c8247 100644 --- a/tests/vbltest/vbltest.c +++ b/tests/vbltest/vbltest.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include "xf86drm.h" -- 2.7.0