From 864d02e4a96fb4e33f8e719354214d6c1ba21114 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Wed, 4 Jan 2023 17:25:24 -0500 Subject: [PATCH] Merge bitcoin/bitcoin#26809: compat: use STDIN_FILENO over 0 585c6722128537f772043ef4c87238e283669b8a compat: use STDIN_FILENO over 0 (fanquake) Pull request description: This is already used throughout this file, and is self-documenting. ACKs for top commit: john-moffett: ACK 585c6722128537f772043ef4c87238e283669b8a achow101: ACK 585c6722128537f772043ef4c87238e283669b8a hebasto: ACK 585c6722128537f772043ef4c87238e283669b8a, I have reviewed the code and it looks OK, I agree it can be merged. kristapsk: utACK 585c6722128537f772043ef4c87238e283669b8a aureleoules: ACK 585c6722128537f772043ef4c87238e283669b8a Tree-SHA512: c0114ae896ba5404be70b804ee9f454d213f1d789c8f5a578c422dd15a308a214e6851fee76c0ec736a212bc86fb33ec17af1b22e5d23422c375ca4458251356 --- src/compat/stdin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compat/stdin.cpp b/src/compat/stdin.cpp index 0fc4e0fcf2..b6975a4cd3 100644 --- a/src/compat/stdin.cpp +++ b/src/compat/stdin.cpp @@ -62,7 +62,7 @@ bool StdinReady() return false; #else struct pollfd fds; - fds.fd = 0; /* this is STDIN */ + fds.fd = STDIN_FILENO; fds.events = POLLIN; return poll(&fds, 1, 0) == 1; #endif