diff options
author | Tomasz Malesinski <tomal@rockbox.org> | 2006-10-12 20:09:18 +0000 |
---|---|---|
committer | Tomasz Malesinski <tomal@rockbox.org> | 2006-10-12 20:09:18 +0000 |
commit | a60bb9a067ba36866eba176bcc654619dea66bb2 (patch) | |
tree | 1c1554b44e3726942ac70771268877614686d602 | |
parent | 379b91f5052e216b7ced51073096a4ac8bf1c4c1 (diff) | |
download | rockbox-a60bb9a067ba36866eba176bcc654619dea66bb2.tar.gz rockbox-a60bb9a067ba36866eba176bcc654619dea66bb2.zip |
Do not use our simple snprintf in simulator, because
ALSA library requires a more advanced one. Fixes the
problem with ALSA on Linux.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11206 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/common/sprintf.c | 6 |
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 | |||
159 | struct for_snprintf { | 163 | struct 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 | |||
215 | struct for_fprintf { | 221 | struct 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 */ |