aboutsummaryrefslogtreecommitdiff
path: root/libbb/xfuncs_printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/xfuncs_printf.c')
-rw-r--r--libbb/xfuncs_printf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c
index f0399ca45..d672e43e5 100644
--- a/libbb/xfuncs_printf.c
+++ b/libbb/xfuncs_printf.c
@@ -111,6 +111,7 @@ void* FAST_FUNC xmemdup(const void *s, int n)
111 return memcpy(xmalloc(n), s, n); 111 return memcpy(xmalloc(n), s, n);
112} 112}
113 113
114#if !ENABLE_PLATFORM_MINGW32
114void* FAST_FUNC mmap_read(int fd, size_t size) 115void* FAST_FUNC mmap_read(int fd, size_t size)
115{ 116{
116 return mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0); 117 return mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
@@ -131,6 +132,7 @@ void* FAST_FUNC xmmap_anon(size_t size)
131 bb_die_memory_exhausted(); 132 bb_die_memory_exhausted();
132 return p; 133 return p;
133} 134}
135#endif
134 136
135// Die if we can't open a file and return a FILE* to it. 137// Die if we can't open a file and return a FILE* to it.
136// Notice we haven't got xfread(), This is for use with fscanf() and friends. 138// Notice we haven't got xfread(), This is for use with fscanf() and friends.
@@ -543,6 +545,7 @@ void FAST_FUNC selinux_or_die(void)
543/* not defined, other code must have no calls to it */ 545/* not defined, other code must have no calls to it */
544#endif 546#endif
545 547
548#if !ENABLE_PLATFORM_MINGW32
546int FAST_FUNC ioctl_or_perror_and_die(int fd, unsigned request, void *argp, const char *fmt,...) 549int FAST_FUNC ioctl_or_perror_and_die(int fd, unsigned request, void *argp, const char *fmt,...)
547{ 550{
548 int ret; 551 int ret;
@@ -707,6 +710,7 @@ void FAST_FUNC xvfork_parent_waits_and_exits(void)
707 } 710 }
708 /* Child continues */ 711 /* Child continues */
709} 712}
713#endif /* !ENABLE_PLATFORM_MINGW32 */
710 714
711// Useful when we do know that pid is valid, and we just want to wait 715// Useful when we do know that pid is valid, and we just want to wait
712// for it to exit. Not existing pid is fatal. waitpid() status is not returned. 716// for it to exit. Not existing pid is fatal. waitpid() status is not returned.
@@ -720,11 +724,13 @@ int FAST_FUNC wait_for_exitstatus(pid_t pid)
720 return exit_status; 724 return exit_status;
721} 725}
722 726
727#if !ENABLE_PLATFORM_MINGW32
723void FAST_FUNC xsettimeofday(const struct timeval *tv) 728void FAST_FUNC xsettimeofday(const struct timeval *tv)
724{ 729{
725 if (settimeofday(tv, NULL)) 730 if (settimeofday(tv, NULL))
726 bb_simple_perror_msg_and_die("settimeofday"); 731 bb_simple_perror_msg_and_die("settimeofday");
727} 732}
733#endif
728 734
729void FAST_FUNC xgettimeofday(struct timeval *tv) 735void FAST_FUNC xgettimeofday(struct timeval *tv)
730{ 736{