Make IRIX happy
authorJelmer Vernooij <jelmer@samba.org>
Mon, 4 Nov 2002 14:08:11 +0000 (14:08 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 4 Nov 2002 14:08:11 +0000 (14:08 +0000)
source/nmbd/nmbd.c
source/smbd/server.c

index 29caa64abc4453a06a6e805eb09cda044482f2b8..9f4a934fae8d180ffc18a9b82e907da8d823c732 100644 (file)
@@ -661,28 +661,27 @@ static BOOL init_structs(void)
  **************************************************************************** */
  int main(int argc, const char *argv[])
 {
-
-  extern BOOL append_log;
-  BOOL opt_interactive = False;
-  poptContext pc;
-   struct poptOption long_options[] = {
-         POPT_AUTOHELP
-       {"daemon", 'D', POPT_ARG_VAL, &is_daemon, True, "Become a daemon(default)" },
-       {"log-append", 'a', POPT_ARG_VAL, &append_log, True, "Append to log file" },
-       {"interactive", 'i', POPT_ARG_VAL, &opt_interactive, True, "Run interactive (not a daemon)" },
-       {"log-overwrite", 'o', POPT_ARG_VAL, &append_log, False, "Overwrite log file, don't append" },
-       {"hosts", 'H', POPT_ARG_STRING, dyn_LMHOSTSFILE, 'H', "Load a netbios hosts file"},
-       {"port", 'p', POPT_ARG_INT, &global_nmb_port, NMB_PORT, "Listen on the specified port" },
+       extern BOOL append_log;
+       static BOOL opt_interactive = False;
+       poptContext pc;
+       struct poptOption long_options[] = {
+       POPT_AUTOHELP
+       {"daemon", 'D', POPT_ARG_VAL, &is_daemon, True, "Become a daemon(default)" },
+       {"log-append", 'a', POPT_ARG_VAL, &append_log, True, "Append to log file" },
+       {"interactive", 'i', POPT_ARG_VAL, &opt_interactive, True, "Run interactive (not a daemon)" },
+       {"log-overwrite", 'o', POPT_ARG_VAL, &append_log, False, "Overwrite log file, don't append" },
+       {"hosts", 'H', POPT_ARG_STRING, dyn_LMHOSTSFILE, 'H', "Load a netbios hosts file"},
+       {"port", 'p', POPT_ARG_INT, &global_nmb_port, NMB_PORT, "Listen on the specified port" },
        {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug },
        {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_configfile },
        {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_socket_options },
        {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version },
        {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_netbios_name },
        {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_log_base },
-       { NULL }
-  };
-  int opt;
-  pstring logfile;
+       { NULL }
+       };
+       int opt;
+       pstring logfile;
 
   append_log = True;  /* Default, override with '-o' option. */
 
index de453fb12b9a258df0c1804b7e12a86995be70cf..b17ca7ba2c3218447ef72e284614e4733bc2ebf5 100644 (file)
@@ -619,9 +619,9 @@ static void init_structs(void )
  int main(int argc,const char *argv[])
 {
        /* shall I run as a daemon */
-       BOOL is_daemon = False;
-       BOOL interactive = False;
-       char *ports = NULL;
+       static BOOL is_daemon = False;
+       static BOOL interactive = False;
+       static char *ports = NULL;
        int opt;
        poptContext pc;