mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-24 11:55:43 +00:00
In BSD getopt we need to set variable "optreset" to 1 if we are going to call
getopt() for the second time. git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@162 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
84f29d62fc
commit
e618a49cf4
@ -4298,8 +4298,12 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/* handle other command line arguments */
|
/* handle other command line arguments */
|
||||||
|
|
||||||
|
#if defined(__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__)
|
||||||
|
optind = optreset = 1;
|
||||||
|
#else
|
||||||
optind = 0;
|
optind = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int c = getopt(argc,
|
int c = getopt(argc,
|
||||||
argv,
|
argv,
|
||||||
|
Loading…
Reference in New Issue
Block a user