Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com>
---
 libbb/messages.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/libbb/messages.c b/libbb/messages.c
index 1d0e587..c3ddbf3 100644
--- a/libbb/messages.c
+++ b/libbb/messages.c
@@ -43,8 +43,13 @@ const char bb_path_shadow_file[] ALIGN1 = "/etc/shadow";
 const char bb_path_group_file[] ALIGN1 = "/etc/group";
 const char bb_path_gshadow_file[] ALIGN1 = "/etc/gshadow";
 const char bb_path_motd_file[] ALIGN1 = "/etc/motd";
+#if ENABLE_TARGET_WIN32
+/* this one is only used in diff and ash at the moment */
+const char bb_dev_null[] ALIGN1 = "nul";
+#else
 const char bb_dev_null[] ALIGN1 = "/dev/null";
 const char bb_busybox_exec_path[] ALIGN1 = CONFIG_BUSYBOX_EXEC_PATH;
+#endif
 const char bb_default_login_shell[] ALIGN1 = LIBBB_DEFAULT_LOGIN_SHELL;
 /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin,
  * but I want to save a few bytes here. Check libbb.h before changing! */
@@ -57,6 +62,7 @@ const int const_int_1 = 1;
  * and it will end up in bss */
 const int const_int_0 = 0;
 
+#if !ENABLE_TARGET_WIN32 /* No wtmp on Windows */
 #include <utmp.h>
 /* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */
 const char bb_path_wtmp_file[] ALIGN1 =
@@ -67,6 +73,7 @@ const char bb_path_wtmp_file[] ALIGN1 =
 #else
 #error unknown path to wtmp file
 #endif
+#endif
 
 /* We use it for "global" data via *(struct global*)&bb_common_bufsiz1.
  * Since gcc insists on aligning struct global's members, it would be a pity
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to