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/af1269ac0118
branches:  trunk
changeset: 793756:af1269ac0118
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 ece38bca75ed -r af1269ac0118 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