$OpenBSD: patch-src_main_cpp,v 1.2 2008/09/08 07:48:43 wilfried Exp $
--- src/main.cpp.orig	Fri Aug 11 22:29:12 2006
+++ src/main.cpp	Thu Aug 21 13:27:40 2008
@@ -22,7 +22,9 @@
 #undef VERSION
 #endif
 #include <m_string.h>
+#if MYSQL_VERSION_ID >= 40000
 #include <my_getopt.h>
+#endif
 #ifndef NO_QT
 #define NO_QT
 #endif
@@ -44,6 +46,7 @@ static const char *load_default_groups[]= { "mysqlcc",
 static ulong select_limit,my_net_buffer_length,max_join_size,my_max_allowed_packet,opt_connect_timeout=0;
 static uint opt_local_infile=0;
 
+#if MYSQL_VERSION_ID >= 40000
 static struct my_option my_long_options[] =
 {
   {"compress", 'C', "Use compression in server/client protocol.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -185,6 +188,7 @@ static void usage()
   my_print_variables(my_long_options);
   exit(-1);
 }
+#endif
 
 
 int main(int argc, char *argv[])
@@ -196,8 +200,10 @@ int main(int argc, char *argv[])
   load_defaults("my",load_default_groups,&argc,&argv);
   save_argv = argv;
   progname= argv[0];
+#if MYSQL_VERSION_ID >= 40000
   if (handle_options(&argc, &argv, my_long_options, get_one_option))
     exit(-1);
+#endif
   if (!argv[0] || !argv[1] || (pid = atoi(argv[0])) <= 0 || (t= atoi(argv[1])) <= 0)  
     ret = mysqlcc_main(argc, argv);
   free_defaults(save_argv);
