1From b879e6886498fdd147287bffdf5867378c7f3299 Mon Sep 17 00:00:00 2001 2From: Baruch Siach <baruch@tkos.co.il> 3Date: Thu, 24 Jun 2021 14:28:10 +0300 4Subject: [PATCH] daemon: fix build with musl libc (again) 5 6Commit 6b28c54dd95b3 added HAVE_SYS_TTYDEFAULTS_H to guard 7sys/ttydefaults.h include. This breaks musl libc build because 8HAVE_SYS_TTYDEFAULTS_H is not defined until config.h is included. 9 10Move sys/ttydefaults.h include below config.h 11 12Signed-off-by: Baruch Siach <baruch@tkos.co.il> 13--- 14Upstream status: https://github.com/raforg/daemon/pull/4 15 16 daemon.c | 7 ++++--- 17 1 file changed, 4 insertions(+), 3 deletions(-) 18 19diff --git a/daemon.c b/daemon.c 20index 5c5ef2cb86df..f88a0d49bf84 100644 21--- a/daemon.c 22+++ b/daemon.c 23@@ -1011,9 +1011,6 @@ I<elogind(8)> 24 #ifdef _RESTORE_POSIX_SOURCE 25 #define _POSIX_SOURCE 26 #endif 27-#ifdef HAVE_SYS_TTYDEFAULTS_H /* For CEOF in musl libc (Linux only) */ 28-#include <sys/ttydefaults.h> 29-#endif 30 #include <dirent.h> 31 #include <sys/wait.h> 32 #include <sys/stat.h> 33@@ -1037,6 +1034,10 @@ I<elogind(8)> 34 #include <systemd/sd-login.h> 35 #endif 36 37+#ifdef HAVE_SYS_TTYDEFAULTS_H /* For CEOF in musl libc (Linux only) */ 38+#include <sys/ttydefaults.h> 39+#endif 40+ 41 /* Configuration file entries */ 42 43 typedef struct Config Config; 44-- 452.30.2 46 47