aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-03-22 15:48:57 +0000
committerRon Yorston <rmy@pobox.com>2012-03-22 15:48:57 +0000
commit9db164d6e39050d09f38288c6045cd2a2cbf6d63 (patch)
treeea5dc2d28d15da0de25c197ed7d059c3656af1a0 /include/libbb.h
parent1118c95535ea51961437089fc3dece5ab4ea7e1b (diff)
parentd84b175cb6948eb17f847313bf912174e2f934e1 (diff)
downloadbusybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.tar.gz
busybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.tar.bz2
busybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.zip
Merge commit 'd84b175cb6948eb17f847313bf912174e2f934e1' into merge
Conflicts: include/platform.h
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h25
1 files changed, 6 insertions, 19 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 363fe53df..6e63e65f5 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -52,6 +52,12 @@
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/* Don't do this here:
56 * #include <sys/sysinfo.h>
57 * Some linux/ includes pull in conflicting definition
58 * of struct sysinfo (only in some toolchanins), which breaks build.
59 * Include sys/sysinfo.h only in those files which need it.
60 */
55#if ENABLE_SELINUX 61#if ENABLE_SELINUX
56# include <selinux/selinux.h> 62# include <selinux/selinux.h>
57# include <selinux/context.h> 63# include <selinux/context.h>
@@ -142,25 +148,6 @@ int klogctl(int type, char *b, int len);
142#if !defined __FreeBSD__ 148#if !defined __FreeBSD__
143char *dirname(char *path); 149char *dirname(char *path);
144#endif 150#endif
145/* Include our own copy of struct sysinfo to avoid binary compatibility
146 * problems with Linux 2.4, which changed things. Grumble, grumble. */
147struct sysinfo {
148 long uptime; /* Seconds since boot */
149 unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
150 unsigned long totalram; /* Total usable main memory size */
151 unsigned long freeram; /* Available memory size */
152 unsigned long sharedram; /* Amount of shared memory */
153 unsigned long bufferram; /* Memory used by buffers */
154 unsigned long totalswap; /* Total swap space size */
155 unsigned long freeswap; /* swap space still available */
156 unsigned short procs; /* Number of current processes */
157 unsigned short pad; /* Padding needed for m68k */
158 unsigned long totalhigh; /* Total high memory size */
159 unsigned long freehigh; /* Available high memory size */
160 unsigned int mem_unit; /* Memory unit size in bytes */
161 char _f[20 - 2 * sizeof(long) - sizeof(int)]; /* Padding: libc5 uses this.. */
162};
163int sysinfo(struct sysinfo* info);
164#ifndef PATH_MAX 151#ifndef PATH_MAX
165# define PATH_MAX 256 152# define PATH_MAX 256
166#endif 153#endif