summaryrefslogtreecommitdiff
path: root/vsprintf.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2014-02-26 00:01:00 +0000
committerDmitry V. Levin <ldv@altlinux.org>2014-02-26 00:01:00 +0000
commitd354130b3ac060051b55cda46c45ab5f5574548d (patch)
treeb2ed90d03309de776cea1cdd1289288c33b9b914 /vsprintf.c
parenta78d777c869829a3f0320e1793adb44fb57ac950 (diff)
downloadstrace-d354130b3ac060051b55cda46c45ab5f5574548d.tar.gz
strace-d354130b3ac060051b55cda46c45ab5f5574548d.tar.bz2
strace-d354130b3ac060051b55cda46c45ab5f5574548d.tar.xz
Fix build with Bionic libc
Add generic tests for fopen64 and fputs_unlocked functions to fix build with Bionic libc that does not provide them. * configure.ac (AC_CHECK_FUNCS): Add fopen64 and fputs_unlocked. * strace.c [_LARGEFILE64_SOURCE]: Use fopen instead of fopen64 if !HAVE_FOPEN64. Use fputs instead of fputs_unlocked if !HAVE_FPUTS_UNLOCKED. * vsprintf.c: Use fputs instead of fputs_unlocked if !HAVE_FPUTS_UNLOCKED. Reported-by: Elliott Hughes <enh@google.com>
Diffstat (limited to 'vsprintf.c')
-rw-r--r--vsprintf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vsprintf.c b/vsprintf.c
index 92fe1a7..0125e72 100644
--- a/vsprintf.c
+++ b/vsprintf.c
@@ -16,6 +16,10 @@
#include <stdarg.h>
#include <limits.h>
+#ifndef HAVE_FPUTS_UNLOCKED
+# define fputs_unlocked fputs
+#endif
+
#define noinline_for_stack /*nothing*/
#define likely(expr) (expr)
#define unlikely(expr) (expr)