]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - command.c
Make it compile on FreeBSD.
[paraslash.git] / command.c
index 516a62fe520887e1b015ff8e159b8027dd86b232..e33bae61133d04eaaba48fc71cf358d4b14cbe5b 100644 (file)
--- a/command.c
+++ b/command.c
@@ -6,9 +6,13 @@
 
 /** \file command.c does client authentication and executes server commands */
 
-#include <sys/time.h> /* gettimeofday */
-#include "para.h" /* gettimeofday */
+#include <signal.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <openssl/rc4.h>
 
+#include "para.h"
 #include "server.cmdline.h"
 #include "afs_common.h"
 #include "afh.h"
@@ -16,7 +20,6 @@
 #include "vss.h"
 #include "send.h"
 #include "rc4.h"
-#include <openssl/rc4.h>
 #include "error.h"
 #include "net.h"
 #include "daemon.h"
@@ -473,7 +476,7 @@ static struct server_command *get_cmd_ptr(const char *name, char **handler)
                if (!strcmp(cmd->name, name))
                        return cmd;
        /* not found, look for commands supported by afs */
-       for (cmd = afs_cmds; cmd; cmd++)
+       for (cmd = afs_cmds; cmd->name; cmd++)
                if (!strcmp(cmd->name, name))
                        return cmd;
        return NULL;