From 32390732d75d1d4680a562404ef4298869f37b12 Mon Sep 17 00:00:00 2001 From: Kevin Bowling Date: Tue, 23 Nov 2010 19:40:23 -0700 Subject: [PATCH] Fix snprintf related failures on IRIX. --- evutil.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/evutil.c b/evutil.c index db827cfd..c326e5be 100644 --- a/evutil.c +++ b/evutil.c @@ -1483,6 +1483,13 @@ evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap) r = _vsnprintf(buf, buflen, format, ap); if (r < 0) r = _vscprintf(format, ap); +#elif defined(sgi) + /* Make sure we always use the correct vsnprintf on IRIX */ + extern int _xpg5_vsnprintf(char * __restrict, + __SGI_LIBC_NAMESPACE_QUALIFIER size_t, + const char * __restrict, /* va_list */ char *); + + r = _xpg5_vsnprintf(buf, buflen, format, ap); #else r = vsnprintf(buf, buflen, format, ap); #endif