summaryrefslogtreecommitdiff
blob: f2765cdfb933a35c32c8a96e267a40865da7608d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- scponly-4.2/helper.c.orig	2005-12-26 20:56:20.000000000 +0100
+++ scponly-4.2/helper.c	2005-12-26 22:05:53.000000000 +0100
@@ -36,7 +36,9 @@
 
 extern char *optarg;
 extern int optind;
+#ifdef HAVE_OPTRESET
 extern int optreset;
+#endif
 
 #ifdef UNIX_COMPAT
 char* solaris_needs_strsep(char** str, char* delims)
@@ -156,8 +158,16 @@
 				/* 
 				 *	now use getopt to look for our problem option
 				 */
+				#ifdef HAVE_OPTRESET
+				printf("HAVE_OPTRESET defined\n"),
 				optreset=1;
+				#endif
+				#ifdef __GLIBC__
+				printf("__GLIBC defined\n");
+				optind=0;
+				#else
 				optind=1;
+				#endif
 				/*
 				 *	tell getopt to only be strict if the 'opts' is well defined
 				 */