$OpenBSD: patch-src_sdlmain_cpp,v 1.1.1.1 2002/02/28 05:34:00 pvalchev Exp $
--- src/sdlmain.cpp.orig	Tue Feb 26 11:16:44 2002
+++ src/sdlmain.cpp	Tue Feb 26 11:18:49 2002
@@ -27,9 +27,24 @@
 #include <time.h>
 #include <stdio.h>
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__OpenBSD__)
     #include <getopt.h>
+#elif defined(__OpenBSD__)
+#undef __GNUG__
+extern int getopt_long __P((int __argc, char *const *__argv, const char *__shortopts,  const struct option *__longopts, int *__longind));
+struct option {
+  char *name;
+  int has_arg;
+  int *flag;
+  int val;
+};
+# define no_argument 0
+# define required_argument 1
+# define optional_argument 2
 #endif
+
+
+	
 
 #include <string>
 
