$OpenBSD: patch-xmms_getopt_c,v 1.2 2004/04/15 19:23:46 naddy Exp $
--- xmms/getopt.c.orig	1999-07-29 23:03:12.000000000 +0200
+++ xmms/getopt.c	2004-04-14 23:33:55.000000000 +0200
@@ -73,11 +73,12 @@
 
 #ifdef VMS
 #include <unixlib.h>
-#if HAVE_STRING_H - 0
-#include <string.h>
 #endif
 #endif
 
+#ifdef HAVE_STRING_H
+#include <string.h>
+
 #if defined (WIN32) && !defined (__CYGWIN32__)
 /* It's not Unix, really.  See?  Capital letters.  */
 #include <windows.h>
@@ -226,19 +227,6 @@ static char *
 	return 0;
 }
 
-/* If using GCC, we can safely declare strlen this way.
-   If not using GCC, it is ok not to declare it.  */
-#ifdef __GNUC__
-/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
-   That was relevant to code that was here before.  */
-#if !defined (__STDC__) || !__STDC__
-/* gcc with -traditional declares the built-in strlen to return int,
-   and has done so at least since version 2.4.5. -- rms.  */
-extern int strlen(const char *);
-
-#endif /* not __STDC__ */
-#endif /* __GNUC__ */
-
 #endif /* not __GNU_LIBRARY__ */
 
 /* Handle permutation of arguments.  */
@@ -606,8 +594,8 @@ int
 		for (p = longopts, option_index = 0; p->name; p++, option_index++)
 			if (!strncmp(p->name, nextchar, nameend - nextchar))
 			{
-				if ((unsigned int) (nameend - nextchar)
-				    == (unsigned int) strlen(p->name))
+				if ((size_t) (nameend - nextchar)      
+				    == strlen(p->name))
 				{
 					/* Exact match found.  */
 					pfound = p;
