From f2f6b3fd2c2a24f69e870edcc22261da23273b2a Mon Sep 17 00:00:00 2001
From: Peter S. Mazinger <ps.m@gmx.net>
Date: Sat, 16 Apr 2011 13:00:31 +0200
Subject: [PATCH 291/396] provide sysinfo stub

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
---
 libc/sysdeps/linux/common/stubs.c   |    4 ++++
 libc/sysdeps/linux/common/sysinfo.c |    5 ++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c
index 0e62dd7..07c037e 100644
--- a/libc/sysdeps/linux/common/stubs.c
+++ b/libc/sysdeps/linux/common/stubs.c
@@ -458,6 +458,10 @@ make_stub(swapon)
 make_stub(symlink)
 #endif
 
+#ifndef __NR_sysinfo
+make_stub(sysinfo)
+#endif
+
 #ifndef __NR_fadvise64
 make_ret_stub(posix_fadvise)
 #endif
diff --git a/libc/sysdeps/linux/common/sysinfo.c b/libc/sysdeps/linux/common/sysinfo.c
index fc37aaf..7eb2926 100644
--- a/libc/sysdeps/linux/common/sysinfo.c
+++ b/libc/sysdeps/linux/common/sysinfo.c
@@ -8,5 +8,8 @@
  */
 
 #include <sys/syscall.h>
-#include <sys/sysinfo.h>
+
+#ifdef __NR_sysinfo
+# include <sys/sysinfo.h>
 _syscall1(int, sysinfo, struct sysinfo *, info)
+#endif
-- 
1.7.0.4

