summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/common/sprintf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/common/sprintf.c b/firmware/common/sprintf.c
index d1c55d563c..533c74ed3c 100644
--- a/firmware/common/sprintf.c
+++ b/firmware/common/sprintf.c
@@ -156,6 +156,10 @@ static int format(
156 return ok; /* true means good */ 156 return ok; /* true means good */
157} 157}
158 158
159#ifndef SIMULATOR
160/* ALSA library requires a more advanced snprintf, so let's not
161 override it in simulator */
162
159struct for_snprintf { 163struct for_snprintf {
160 unsigned char *ptr; /* where to store it */ 164 unsigned char *ptr; /* where to store it */
161 int bytes; /* amount already stored */ 165 int bytes; /* amount already stored */
@@ -212,6 +216,8 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list ap)
212 return pr.bytes; 216 return pr.bytes;
213} 217}
214 218
219#endif /* SIMULATOR */
220
215struct for_fprintf { 221struct for_fprintf {
216 int fd; /* where to store it */ 222 int fd; /* where to store it */
217 int bytes; /* amount stored */ 223 int bytes; /* amount stored */