From patchwork Tue Apr 18 20:52:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 97580 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp25817qgf; Tue, 18 Apr 2017 13:53:02 -0700 (PDT) X-Received: by 10.98.166.21 with SMTP id t21mr19942319pfe.120.1492548782295; Tue, 18 Apr 2017 13:53:02 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id a71si237761pfc.170.2017.04.18.13.53.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Apr 2017 13:53:02 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-78712-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-78712-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-78712-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=eUWa8Py9WF+mLoXi3LOjf7dF3Ar6ZS5v+LyJQyC4v+JYRaAxH3hby i75mkOz/AbO/cu0vHDA/jh2/Zx9qghkxGXxHwSjOzY4vStmVm8VWxdnqM4+p3ZBA KhJVl7CwlzbfmFoAxdNdouM9QcK1Xe1/pzswXEJV/euHgeaWRF+FYI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=h8AT+Xqinq372NbCT8CHn9+8bc4=; b=iDEd9Ut0ccY9kp8kfanRO0V7+qP0 rKZtgxbCsiOkE/uQgQImNjgVF/Jh0linK1JFivQXKM98fPQNyJ0yMnsd2CrjOG0l fYQ3gikM/F2YlWFmrgcuCYKbxaUWXm7A5aVKBk3YtOzQlaYd88VAgNpgRqbxEAX5 klCODfTTCjnJFUY= Received: (qmail 129340 invoked by alias); 18 Apr 2017 20:52:49 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 129318 invoked by uid 89); 18 Apr 2017 20:52:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=stat, H*p:D*org X-HELO: mail-qt0-f182.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=+ssnW49hizQTc9ARqypA8zDaJB8SplZE2/p2QvKRojc=; b=ADcNw04HfwCJ5Pul0BrXIQfOBwsE+kOkTvBrB4sDdEXAMzhPUgGItzPhD2cScW0a4h SFyon/tFPk088UuxPw/xgWkj01GHLyApZwoT/FL/VJGyVsetsbupWhFxE3nLy8AtMCKV 1K5PaRLoYIgQ38AVA2vy7qOUyhFqGD9ihZFBS8BtQWJktudMX6LpFGa/8GRBC0MJRPKl FisaRPxlyC8TX3XmNEpqZRCxbVhGacdMsDJgNYu5/Iau4c7nlMVgWs0280IlgXs3w3BV T8cpoSSeZlfBlH699MqPdlcXxZOVC7ApRHHkuX/Ho2k/ugb/IBtrcFTH8P+QdheqZKeN FovQ== X-Gm-Message-State: AN3rC/73hui0f+oXfgXga1sjQLbf3jkaLg8+eth72rVNgyXKmP8J64O7 sCvixvnuq8BI8n8Ftu/JVg== X-Received: by 10.200.46.157 with SMTP id h29mr17342785qta.39.1492548767559; Tue, 18 Apr 2017 13:52:47 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] Fix missing timespec definition for sys/stat.h (BZ #21371) Date: Tue, 18 Apr 2017 17:52:39 -0300 Message-Id: <1492548759-4319-1-git-send-email-adhemerval.zanella@linaro.org> As indicated by the bug report, the 'struct timespec' definition is not defined for '_XOPEN_SOURCE=700' and '_POSIX_C_SOURCE=200112L'. It is because current code only includes its definition if __USE_ATFILE is defined and the define is only set with: 1. _GNU_SOURCE and/or _ATFILE_SOURCE definition. 2. _POSIX_C_SOURCE >= 200809L However, the 'st_*' fields in 'struct stat' are defined if __USE_XOPEN2K8. This patch uses the same login for 'struct timespec' inclusion. Tested on x86_64-linux-gnu. * io/sys/stat.h: Use __USE_XOPEN2K8 insteaf of __USE_ATFILE for struct timespec definition. --- io/sys/stat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/io/sys/stat.h b/io/sys/stat.h index 2ada4a5..ac7ef1f 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -26,7 +26,7 @@ #include /* For __mode_t and __dev_t. */ -#ifdef __USE_ATFILE +#ifdef __USE_XOPEN2K8 # include #endif