From 70087c55fffc3cbc52f550418e6b1230bbb1b3b3 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Wed, 25 Jan 2012 16:36:40 +0000 Subject: [PATCH] hw/xwin: Fix redundant declaration warnings in winmonitors.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include xwin-config.h so HAVE_STRLCPY and HAVE_STRNDUP are defined, so duplicate declarations of strlcpy(), strlcat() and strndup() aren't made by os.h In file included from ../../include/misc.h:111:0, from ../../include/screenint.h:51, from ../../include/scrnintstr.h:51, from win.h:157, from winmonitors.c:31: ../../include/os.h:491:15: error: redundant redeclaration of ‘strlcpy’ /usr/include/string.h:86:35: note: previous declaration of ‘strlcpy’ was here ../../include/os.h:492:15: error: redundant redeclaration of ‘strlcat’ /usr/include/string.h:85:35: note: previous declaration of ‘strlcat’ was here ../../include/os.h:496:15: error: redundant redeclaration of ‘strndup’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xwin/winmonitors.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/xwin/winmonitors.c b/hw/xwin/winmonitors.c index 07532f6f5..76063d300 100644 --- a/hw/xwin/winmonitors.c +++ b/hw/xwin/winmonitors.c @@ -27,6 +27,10 @@ from The Open Group. */ +#ifdef HAVE_XWIN_CONFIG_H +#include +#endif + #include "win.h" #include "winmonitors.h"