aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-08-30 06:00:32 -0500
committerRob Landley <rob@landley.net>2015-08-30 06:00:32 -0500
commite96dd0716e5932625af9e8a91bfa3d989abe1fdb (patch)
tree75be77f47f951053e17609fdfea77b3c6b98d56c
parent6fde0f9be2c78d336b2bbcb4c1488bd171c8bccd (diff)
downloadtoybox-e96dd0716e5932625af9e8a91bfa3d989abe1fdb.tar.gz
Add portability.h glue to let uptime build without TOYBOX_UTMPX.
-rw-r--r--lib/portability.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h
index ff22fa59..f2f98069 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -225,6 +225,12 @@ ssize_t getline(char **lineptr, size_t *n, FILE *stream);
#endif
#if CFG_TOYBOX_UTMPX
#include <utmpx.h>
+#else
+struct utmpx {int ut_type;};
+#define USER_PROCESS 0
+static inline struct utmpx *getutxent(void) {return 0;}
+static inline void setutxent(void) {;}
+static inline void endutxent(void) {;}
#endif
// Some systems don't define O_NOFOLLOW, and it varies by architecture, so...