openbsd-ports/games/cosmosmash/patches/patch-src_sdl_sdlmain_cpp
pvalchev aad3762657 Import of cosmosmash-1.1; maintained by Sean Escriva <eliab@spack.org>
Cosmosmash is a clone of the 1981 Astrosmash video game. Spin, Blast and shoot
your way through a hostile universe of tumbling steriods and homicidal aliens.
You've got the wits and the speed, but you're awesomely outnumbered.
2002-02-28 05:28:12 +00:00

28 lines
684 B
Plaintext

$OpenBSD: patch-src_sdl_sdlmain_cpp,v 1.1.1.1 2002/02/28 05:28:12 pvalchev Exp $
--- src/sdlmain.cpp.orig Fri Nov 23 21:16:24 2001
+++ src/sdlmain.cpp Sun Feb 24 20:00:17 2002
@@ -30,8 +30,22 @@
#include <errno.h>
#include <time.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