Date: Sun, 18 Jan 2004 12:44:55 -0800 From: Max Khon <fjoe@FreeBSD.org> To: Clement LAFORET <clement@FreeBSD.org> Cc: ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/mail/libesmtp Makefile Message-ID: <20040118204455.GA35450@FreeBSD.org> In-Reply-To: <200401181147.i0IBl79Q029549@repoman.freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
Hello!
On Sun, Jan 18, 2004 at 03:47:07AM -0800, Clement LAFORET wrote:
> clement 2004/01/18 03:47:07 PST
>
> FreeBSD ports repository
>
> Modified files:
> mail/libesmtp Makefile
> Log:
> s/memrchr/memchr/.
> It fixes an 'undefined reference to `memrchr''.
>
> Approved by: maintainer
> Approved by: erwin (mentor) (implicitly)
This fix is totally incorrect. memrchr is not a typo and was there
intentionally (please take a look at the comments in the patched file one
line before the places where memrchr is used).
The correct fix is to add an implementation of memrchr.c to smtp-tls.c
(attached).
/fjoe
[-- Attachment #2 --]
--- smtp-tls.c.orig Mon Jan 19 02:36:32 2004
+++ smtp-tls.c Mon Jan 19 02:41:25 2004
@@ -450,6 +450,20 @@
return 1;
}
+#if defined(__FreeBSD__)
+void *
+memrchr(const void *v, int c, size_t size)
+{
+ const unsigned char *p = (const unsigned char *) v + size;
+
+ while (size-- > 0) {
+ if (*--p == c)
+ return (void *) p;
+ }
+ return NULL;
+}
+#endif
+
/* Perform a domain name comparison where the reference may contain
wildcards. This implements the comparison from RFC 2818.
Each component of the domain name is matched separately, working from
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040118204455.GA35450>
