From 8c215d1da5dd8f513b3ff96d4f621d416d744ffe Mon Sep 17 00:00:00 2001
From: Joerg Wunsch <j@uriah.heep.sax.de>
Date: Sat, 30 Sep 2006 20:48:17 +0000
Subject: [PATCH] Make the private prototype for gettimeofday() only visible if
 the autoconfiguration figured out we need it.  The private implementation has
 already been protected that way.

This should finally really fix bug #17884: another gettimeofday
conflict under win32/cygwin


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@669 81a1dc3b-b13d-400b-aceb-764788c761c2
---
 avrdude/pgm.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/avrdude/pgm.h b/avrdude/pgm.h
index 882d8888..1a8813aa 100644
--- a/avrdude/pgm.h
+++ b/avrdude/pgm.h
@@ -110,6 +110,7 @@ PROGRAMMER * pgm_new(void);
 
 #if defined(WIN32NATIVE)
 
+#include "ac_cfg.h"
 #include <windows.h>
 
 /* usleep replacements */
@@ -121,7 +122,9 @@ PROGRAMMER * pgm_new(void);
 */
 void usleep(unsigned long us);
 
+#if !defined(HAVE_GETTIMEOFDAY)
 int gettimeofday(struct timeval *tv, struct timezone *tz);
+#endif /* HAVE_GETTIMEOFDAY */
 
 #endif /* __win32native_h */