mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Patch up the getopt code to work around a crash when no long name is
present. This has already been committed upstream, and adding it as a patch is just a temporary fix to keep subversion from segfaulting when you do 'svn --version' until I have a chance to update the port to a newer version of apr. Submitted by: Garrett Rooney <rooneg@electricjellyfish.net> (MAINTAINER)
This commit is contained in:
parent
48cd8d4c7d
commit
47ffa30707
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=64431
4 changed files with 60 additions and 0 deletions
15
devel/apr/files/patch-apr-misc-unix-getopt.c
Normal file
15
devel/apr/files/patch-apr-misc-unix-getopt.c
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
--- apr/misc/unix/getopt.c.orig Thu Nov 29 06:19:51 2001
|
||||||
|
+++ apr/misc/unix/getopt.c Sun Aug 11 11:29:01 2002
|
||||||
|
@@ -237,10 +237,12 @@
|
||||||
|
for (i = 0; ; i++) {
|
||||||
|
if (opts[i].optch == 0) /* No match */
|
||||||
|
return serr(os, "invalid option", p - 2, APR_BADCH);
|
||||||
|
+ if (opts[i].name) {
|
||||||
|
len = strlen(opts[i].name);
|
||||||
|
if (strncmp(p, opts[i].name, len) == 0
|
||||||
|
&& (p[len] == '\0' || p[len] == '='))
|
||||||
|
break;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
*optch = opts[i].optch;
|
||||||
|
|
15
devel/apr0/files/patch-apr-misc-unix-getopt.c
Normal file
15
devel/apr0/files/patch-apr-misc-unix-getopt.c
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
--- apr/misc/unix/getopt.c.orig Thu Nov 29 06:19:51 2001
|
||||||
|
+++ apr/misc/unix/getopt.c Sun Aug 11 11:29:01 2002
|
||||||
|
@@ -237,10 +237,12 @@
|
||||||
|
for (i = 0; ; i++) {
|
||||||
|
if (opts[i].optch == 0) /* No match */
|
||||||
|
return serr(os, "invalid option", p - 2, APR_BADCH);
|
||||||
|
+ if (opts[i].name) {
|
||||||
|
len = strlen(opts[i].name);
|
||||||
|
if (strncmp(p, opts[i].name, len) == 0
|
||||||
|
&& (p[len] == '\0' || p[len] == '='))
|
||||||
|
break;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
*optch = opts[i].optch;
|
||||||
|
|
15
devel/apr1/files/patch-apr-misc-unix-getopt.c
Normal file
15
devel/apr1/files/patch-apr-misc-unix-getopt.c
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
--- apr/misc/unix/getopt.c.orig Thu Nov 29 06:19:51 2001
|
||||||
|
+++ apr/misc/unix/getopt.c Sun Aug 11 11:29:01 2002
|
||||||
|
@@ -237,10 +237,12 @@
|
||||||
|
for (i = 0; ; i++) {
|
||||||
|
if (opts[i].optch == 0) /* No match */
|
||||||
|
return serr(os, "invalid option", p - 2, APR_BADCH);
|
||||||
|
+ if (opts[i].name) {
|
||||||
|
len = strlen(opts[i].name);
|
||||||
|
if (strncmp(p, opts[i].name, len) == 0
|
||||||
|
&& (p[len] == '\0' || p[len] == '='))
|
||||||
|
break;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
*optch = opts[i].optch;
|
||||||
|
|
15
devel/apr2/files/patch-apr-misc-unix-getopt.c
Normal file
15
devel/apr2/files/patch-apr-misc-unix-getopt.c
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
--- apr/misc/unix/getopt.c.orig Thu Nov 29 06:19:51 2001
|
||||||
|
+++ apr/misc/unix/getopt.c Sun Aug 11 11:29:01 2002
|
||||||
|
@@ -237,10 +237,12 @@
|
||||||
|
for (i = 0; ; i++) {
|
||||||
|
if (opts[i].optch == 0) /* No match */
|
||||||
|
return serr(os, "invalid option", p - 2, APR_BADCH);
|
||||||
|
+ if (opts[i].name) {
|
||||||
|
len = strlen(opts[i].name);
|
||||||
|
if (strncmp(p, opts[i].name, len) == 0
|
||||||
|
&& (p[len] == '\0' || p[len] == '='))
|
||||||
|
break;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
*optch = opts[i].optch;
|
||||||
|
|
Loading…
Add table
Reference in a new issue