aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libbb.h23
1 files changed, 4 insertions, 19 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 1502272f6..3d31ff225 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -52,6 +52,10 @@
52#ifdef HAVE_SYS_STATFS_H 52#ifdef HAVE_SYS_STATFS_H
53# include <sys/statfs.h> 53# include <sys/statfs.h>
54#endif 54#endif
55/* struct sysinfo is linux-specific */
56#ifdef __linux__
57# include <sys/sysinfo.h>
58#endif
55#if ENABLE_SELINUX 59#if ENABLE_SELINUX
56# include <selinux/selinux.h> 60# include <selinux/selinux.h>
57# include <selinux/context.h> 61# include <selinux/context.h>
@@ -133,25 +137,6 @@ int klogctl(int type, char *b, int len);
133#if !defined __FreeBSD__ 137#if !defined __FreeBSD__
134char *dirname(char *path); 138char *dirname(char *path);
135#endif 139#endif
136/* Include our own copy of struct sysinfo to avoid binary compatibility
137 * problems with Linux 2.4, which changed things. Grumble, grumble. */
138struct sysinfo {
139 long uptime; /* Seconds since boot */
140 unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
141 unsigned long totalram; /* Total usable main memory size */
142 unsigned long freeram; /* Available memory size */
143 unsigned long sharedram; /* Amount of shared memory */
144 unsigned long bufferram; /* Memory used by buffers */
145 unsigned long totalswap; /* Total swap space size */
146 unsigned long freeswap; /* swap space still available */
147 unsigned short procs; /* Number of current processes */
148 unsigned short pad; /* Padding needed for m68k */
149 unsigned long totalhigh; /* Total high memory size */
150 unsigned long freehigh; /* Available high memory size */
151 unsigned int mem_unit; /* Memory unit size in bytes */
152 char _f[20 - 2 * sizeof(long) - sizeof(int)]; /* Padding: libc5 uses this.. */
153};
154int sysinfo(struct sysinfo* info);
155#ifndef PATH_MAX 140#ifndef PATH_MAX
156# define PATH_MAX 256 141# define PATH_MAX 256
157#endif 142#endif