1From 2108213242638fa355f662382f55495d91301858 Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Wed, 30 Aug 2017 18:13:17 -0700 4Subject: [PATCH 2/2] Fix build issues found with musl 5 6Signed-off-by: Khem Raj <raj.khem@gmail.com> 7--- 8Upstream-Status: Pending 9 10 ruptime/ruptime.c | 1 + 11 rwho/rwho.c | 1 + 12 rwhod/rwhod.c | 5 +++-- 13 3 files changed, 5 insertions(+), 2 deletions(-) 14 15--- a/ruptime/ruptime.c 16+++ b/ruptime/ruptime.c 17@@ -53,6 +53,7 @@ char ruptime_rcsid[] = 18 #include <string.h> 19 #include <errno.h> 20 #include <time.h> 21+#include <fcntl.h> 22 23 struct hs { 24 char hs_hostname[MAXHOSTNAMELEN]; 25--- a/rwho/rwho.c 26+++ b/rwho/rwho.c 27@@ -49,6 +49,7 @@ char rcsid[] = "$Id: rwho.c,v 1.7 1999/0 28 #include <assert.h> 29 #include <stdio.h> 30 #include <time.h> 31+#include <fcntl.h> 32 #include <protocols/rwhod.h> 33 34 #include "../version.h" 35--- a/rwhod/rwhod.c 36+++ b/rwhod/rwhod.c 37@@ -76,6 +76,7 @@ char rcsid[] = 38 #include <grp.h> 39 #include <time.h> 40 #include <stdint.h> 41+#include <fcntl.h> 42 43 #include "../version.h" 44 45@@ -102,7 +103,7 @@ struct nlist nl[] = { 46 static void broadcaster(void); 47 static int configure(int s); 48 static int verify(const char *name); 49-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2) 50+#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)) 51 static int getloadavg(double ptr[3], int n); 52 #endif 53 54@@ -549,7 +550,7 @@ sendpacket(struct whod *wd) 55 } 56 } 57 58-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2) 59+#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)) 60 /* 61 * Taken from: 62 * 63--- a/include/protocols/rwhod.h 64+++ b/include/protocols/rwhod.h 65@@ -37,6 +37,7 @@ 66 #ifndef _RWHOD_H_ 67 #define _RWHOD_H_ 68 69+#include <stdint.h> 70 /* 71 * rwho protocol packet format. 72 */ 73