summaryrefslogtreecommitdiff
path: root/net/samba/files/patch-source::rpcclient::cmd_reg.c
blob: 0af2a8c3ddf7e7846fd21b7e6144b6bede6b8b0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- source/rpcclient/cmd_reg.c.orig	Thu Nov 27 12:17:08 2003
+++ source/rpcclient/cmd_reg.c	Thu Nov 27 12:19:24 2003
@@ -900,6 +900,9 @@
 {
 	extern char *optarg;
 	extern int optind;
+#if	defined(__FreeBSD__)
+	extern int optreset;
+#endif
 	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
 	fstring msg;
 	uint32 timeout = 20;
@@ -907,7 +910,11 @@
 	int opt;
 
 	*msg = 0;
+#if	defined(__FreeBSD__)
+	optreset = optind = 1;
+#else
 	optind = 0; /* TODO: test if this hack works on other systems too --simo */
+#endif
 
 	while ((opt = getopt(argc, argv, "m:t:rf")) != EOF)
 	{