{
extern char *optarg;
extern int optind;
#if defined(__FreeBSD__)
extern int optreset;
#endif
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
fstring msg;
uint32 timeout = 20;
int opt;
*msg = 0;
optreset = optind = 1;
#else
optind = 0; /* TODO: test if this hack works on other systems too --simo */
while ((opt = getopt(argc, argv, "m:t:rf")) != EOF)