diff options
-rw-r--r-- | lib/util/nstring.c | 8 | ||||
-rw-r--r-- | lib/util/vasprintf.c | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/util/nstring.c b/lib/util/nstring.c index 1e9660c1..5a904188 100644 --- a/lib/util/nstring.c +++ b/lib/util/nstring.c @@ -601,17 +601,15 @@ pm_vsnprintf(char * const str, } } break; default: - /* unrecognized conversion specifier, keep format - string as-is + /* Unrecognized conversion specifier. Discard the + unrecognized conversion, just keep the unrecognized + conversion character. */ zero_padding = 0; /* turn zero padding off for non-numeric convers. */ /* reset flags */ justify_left = 1; min_field_width = 0; - /* discard the unrecognized conversion, just keep the - unrecognized conversion character - */ str_arg = p; str_arg_l = 0; if (*p) diff --git a/lib/util/vasprintf.c b/lib/util/vasprintf.c index e074befb..7baf06f2 100644 --- a/lib/util/vasprintf.c +++ b/lib/util/vasprintf.c @@ -7,7 +7,7 @@ #include "nstring.h" -#if (defined(__GLIBC__) || defined(__GNU_LIBRARY__)) +#if (defined(__GLIBC__) || defined(__GNU_LIBRARY__) || defined(__APPLE__)) #define HAVE_VASPRINTF 1 #else #define HAVE_VASPRINTF 0 |