summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2021-11-04 09:38:44 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2021-11-04 09:38:44 +0900
commit61843dace32f12475b1ade5423deaa0421cbbc0b (patch)
treead96dd6b531421824c241fbe6a764a9808c5fa6a /src
parentcb81007c5033f98c86b0376e797b2034f5cf44ee (diff)
downloadlibgpg-error-61843dace32f12475b1ade5423deaa0421cbbc0b.tar.gz
estream: Only include sys/select.h when needed.
* src/estream.c: The select function is only used when poll is not available. So, let it include the header file only when needed. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'src')
-rw-r--r--src/estream.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/estream.c b/src/estream.c
index f75e052..36be4bb 100644
--- a/src/estream.c
+++ b/src/estream.c
@@ -67,9 +67,6 @@
# endif
#endif
-#ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
-#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
@@ -92,6 +89,10 @@
#else
# ifdef HAVE_POLL_H
# include <poll.h>
+# else
+# ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+# endif
# endif
#endif