bb_dev_null
diff --git a/libbb/Makefile.in b/libbb/Makefile.in
index 36b2ad2..69f8779 100644
--- a/libbb/Makefile.in
+++ b/libbb/Makefile.in
@@ -47,7 +47,7 @@
can_not_create_raw_socket.o perm_denied_are_you_root.o \
shadow_file.o passwd_file.o group_file.o gshadow_file.o nologin_file.o \
securetty_file.o motd_file.o \
- msg_standard_input.o msg_standard_output.o shell_file.o
+ msg_standard_input.o msg_standard_output.o shell_file.o bb_dev_null.o
LIBBB_MSRC1:=$(srcdir)/xfuncs.c
LIBBB_MOBJ1:=xmalloc.o xrealloc.o xcalloc.o xstrdup.o xstrndup.o \
diff --git a/libbb/bb_pwd.c b/libbb/bb_pwd.c
index 9ce1c71..cbd72af 100644
--- a/libbb/bb_pwd.c
+++ b/libbb/bb_pwd.c
@@ -7,6 +7,7 @@
* Licensed under the GPL v2, see the file LICENSE in this tarball.
*/
+#include "libbb.h"
#ifdef L_bb_getgrgid
/* Hacked by Tito Ragusa (c) 2004 <farmatito@tiscali.it> to make it more
@@ -26,7 +27,6 @@
* the program exits.
*/
-#include "libbb.h"
#include "grp_.h"
/* gets a groupname given a gid */
@@ -42,7 +42,6 @@
#ifdef L_bb_xgetgrnam
#include <stdio.h>
#include <string.h>
-#include "libbb.h"
#include "pwd_.h"
#include "grp_.h"
@@ -63,7 +62,6 @@
#ifdef L_bb_xgetpwnam
#include <stdio.h>
#include <string.h>
-#include "libbb.h"
#include "pwd_.h"
#include "grp_.h"
@@ -99,7 +97,6 @@
* the program exits.
*/
-#include "libbb.h"
#include "pwd_.h"
/* gets a username given a uid */
@@ -129,7 +126,6 @@
#include <stdio.h>
#include <assert.h>
-#include "libbb.h"
/* internal function for bb_getpwuid and bb_getgrgid */
diff --git a/libbb/messages.c b/libbb/messages.c
index c3f307e..e6e4dc3 100644
--- a/libbb/messages.c
+++ b/libbb/messages.c
@@ -97,3 +97,7 @@
const char * const bb_default_login_shell = LIBBB_DEFAULT_LOGIN_SHELL;
#endif
+#ifdef L_dev_null
+const char * const bb_dev_null = "dev/null";
+#endif
+