Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumpuser emulate printflike properly to avoid fatal e...



details:   https://anonhg.NetBSD.org/src/rev/b803c3b6a90c
branches:  trunk
changeset: 327016:b803c3b6a90c
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Feb 25 20:58:18 2014 +0000

description:
emulate printflike properly to avoid fatal error on clang

diffstat:

 lib/librumpuser/rumpuser_port.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 3518a76f593e -r b803c3b6a90c lib/librumpuser/rumpuser_port.h
--- a/lib/librumpuser/rumpuser_port.h   Tue Feb 25 20:16:29 2014 +0000
+++ b/lib/librumpuser/rumpuser_port.h   Tue Feb 25 20:58:18 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpuser_port.h,v 1.28 2014/01/16 16:03:33 pooka Exp $ */
+/*     $NetBSD: rumpuser_port.h,v 1.29 2014/02/25 20:58:18 pooka Exp $ */
 
 /*
  * Portability header for non-NetBSD platforms.
@@ -161,8 +161,12 @@
 #endif
 
 #ifndef __printflike
+#ifdef __GNUC__
+#define __printflike(a,b) __attribute__((__format__ (__printf__,a,b)))
+#else
 #define __printflike(a,b)
 #endif
+#endif
 
 #ifndef __noinline
 #ifdef __GNUC__



Home | Main Index | Thread Index | Old Index