rtl8139: Fix compilation for w32/w64
PATCH 1/1 rtl8139: Fix compilation for w32/w64
Compilation for Windows needs a different declaration for the printf format attribute, so use the macro which was defined for this purpose.
Cc Benjamin Poirier <[email protected]>
Signed-off-by Stefan Weil <[email protected]>
--- hw/rtl8139.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
hw/rtl8139.c +1 -2
@@ -88,8 +88,7 @@# define DPRINTF (fmt, ...) \ do { fprintf(stderr, "RTL8139: " fmt, ## __VA_ARGS__); } while (0)#else -static inline __attribute__ ((format (printf,1 ,2 ))) -int DPRINTF (const char *fmt, ...) +static inline GCC_FMT_ATTR(1, 2) int DPRINTF(const char *fmt, ...) {return 0 ; }
Signature · 1 line
1.7.2.5
Aurelien Jarno
AppliedQuoted 9 lines · Stefan Weil
Compilation for Windows needs a different declaration for the printf format attribute, so use the macro which was defined for this purpose.
Cc Benjamin Poirier <[email protected]>Signed-off-by Stefan Weil <[email protected]>--- hw/rtl8139.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Thanks, applied.
Quoted 18 lines
hw/rtl8139.c +1
-2@@ -88,8 +88,7 @@# define DPRINTF (fmt, ...) \ do { fprintf(stderr, "RTL8139: " fmt, ## __VA_ARGS__); } while (0)#else -static inline __attribute__ ((format (printf,1 ,2 ))) -int DPRINTF (const char *fmt, ...) +static inline GCC_FMT_ATTR(1, 2) int DPRINTF(const char *fmt, ...) {return 0 ; }Signature · 1 line
1.7.2.5
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net