From patchwork Sun Sep 3 15:52:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 22597 Received: (qmail 32624 invoked by alias); 3 Sep 2017 15:52:19 -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 32374 invoked by uid 89); 3 Sep 2017 15:52:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_NEUTRAL, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd,commited] hurd: Fix build ot misc/tst-preadvwritev2-common.c Date: Sun, 3 Sep 2017 17:52:09 +0200 Message-Id: <20170903155209.3911-1-samuel.thibault@ens-lyon.org> * misc/tst-preadvwritev2-common.c (RWF_HIPRI, RWF_DSYNC, RWF_SYNC, RWF_NOWAIT): Define to 0 if undefined already. (do_test_with_invalid_flags): Set invalid_flag to 2 if RWF_SUPPORTED boils down to 0. --- ChangeLog | 4 ++++ misc/tst-preadvwritev2-common.c | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4802f7c428..824f19a272 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,6 +31,10 @@ __GI_feraiseexcept. * sysdeps/mach/hurd/i386/Implies: Add mach/hurd/x86. * sysdeps/mach/hurd/x86/dl-sysdep.c: New file. + * misc/tst-preadvwritev2-common.c (RWF_HIPRI, RWF_DSYNC, RWF_SYNC, + RWF_NOWAIT): Define to 0 if undefined already. + (do_test_with_invalid_flags): Set invalid_flag to 2 if RWF_SUPPORTED + boils down to 0. 2017-09-01 Joseph Myers diff --git a/misc/tst-preadvwritev2-common.c b/misc/tst-preadvwritev2-common.c index 8abedc14d0..9d4909bdb7 100644 --- a/misc/tst-preadvwritev2-common.c +++ b/misc/tst-preadvwritev2-common.c @@ -22,9 +22,21 @@ static void do_test_with_invalid_flags (void) { +#ifndef RWF_HIPRI +# define RWF_HIPRI 0 +#endif +#ifndef RWF_DSYNC +# define RWF_DSYNC 0 +#endif +#ifndef RWF_SYNC +# define RWF_SYNC 0 +#endif +#ifndef RWF_NOWAIT +# define RWF_NOWAIT 0 +#endif #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT) /* Set the next bit from the mask of all supported flags. */ - int invalid_flag = __builtin_clz (RWF_SUPPORTED); + int invalid_flag = RWF_SUPPORTED != 0 ? __builtin_clz (RWF_SUPPORTED) : 2; invalid_flag = 0x1 << ((sizeof (int) * CHAR_BIT) - invalid_flag); char buf[32];