summaryrefslogtreecommitdiff
path: root/security/pgp/files
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2016-07-31 15:03:42 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2016-07-31 15:03:42 +0000
commit24bd1478d821f50b620e38cabdb1a2a259a64973 (patch)
tree2fac962d46856505050047a95d4b24d9d97a1daf /security/pgp/files
parentFix build, using getline(3) from libc (diff)
Fix build with getline(3) in libc
Notes
Notes: svn path=/head/; revision=419387
Diffstat (limited to 'security/pgp/files')
-rw-r--r--security/pgp/files/patch-armor.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/security/pgp/files/patch-armor.c b/security/pgp/files/patch-armor.c
new file mode 100644
index 000000000000..562cd892d5fa
--- /dev/null
+++ b/security/pgp/files/patch-armor.c
@@ -0,0 +1,29 @@
+--- armor.c.orig 1996-01-17 19:37:20 UTC
++++ armor.c
+@@ -343,7 +343,7 @@ copyline(FILE * in, FILE * out)
+ * idea.
+ */
+ static int
+-getline(char *buf, int n, FILE * f)
++get_line(char *buf, int n, FILE * f)
+ {
+ int state;
+ char *p;
+@@ -547,7 +547,7 @@ armor_file(char *infilename, char *outfi
+ return 1;
+ }
+ fprintf(outFile, "-----BEGIN PGP SIGNED MESSAGE-----\n\n");
+- while ((i = getline(buffer, sizeof buffer, clearFile)) >= 0) {
++ while ((i = get_line(buffer, sizeof buffer, clearFile)) >= 0) {
+ /* Quote lines beginning with '-' as per RFC1113;
+ * Also quote lines beginning with "From "; this is
+ * for Unix mailers which add ">" to such lines.
+@@ -1231,7 +1231,7 @@ LANG("\n\007Unable to write ciphertext o
+ for (;;) {
+ ++infile_line;
+ nline = status;
+- status = getline(buf, sizeof buf, in);
++ status = get_line(buf, sizeof buf, in);
+ if (status < 0) {
+ fprintf(pgpout,
+ LANG("ERROR: ASCII armor decode input ended unexpectedly!\n"));