From nobody Sun Feb 12 14:14:54 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PF8cb1SRjz3pmRV; Sun, 12 Feb 2023 14:14:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PF8cZ68VGz4MjJ; Sun, 12 Feb 2023 14:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676211294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Lp1bto37fVELH2sTWPlJTSKNXy8EzCfUl/OjlOSjJY=; b=n1LxfiSFA3o134Y/w89/p64nMJDT01o4DhP5KOSs+0OT+ACrPAX/trNrU2W8xzsrG3uh0N JeS/XQtZsluFcm3IDWmsEmfw8dZdTUmG04xGGkLvCj2V6t96YodY5gHvhujS4AhaDWbR4E SQ4QiVUj0R973C6xzbLnCVQ5M8QJZQeWcCBDragmd6na37sOTWweLf0zk7YTEpotkO0wQ7 VXTzM+81NL4suwbixRIcVEH+FzWSY7OqmRsCte435RB9+WgNODbUWX1CMg44KGLHoVuzII w8QytcEJMpKXp5P1XWkn+Nk+3Yq4NC9bHFaZlXe4dHUrJkUzKzav/Epg9thK7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676211294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Lp1bto37fVELH2sTWPlJTSKNXy8EzCfUl/OjlOSjJY=; b=WcVtlRVtFZ2ahBI9rqv89G5yGhSoxdwdiIu2f3+sfd7YB0tMwo+af04kTrVgWkdZASdEJR 9nqoroM6viB6tLWRxBuqkk799NTosz86rnWOCtce9xRqteC4aiOx3XsvDNYqPsJfq8fbdQ 9GM5t9kPwzJaMv9irlKDuNNh3SrmMg+y19Sh9mng3gOIF+P6w0AJlR/O09OAcGARWQH0Ei ufU0AfdLia9fex9PGTxGg85g7FRgxoaCajVUKBuIcNVoa//UjlkB8jbMuqmvCNBPVyBNRJ GBFfECI46xc03Xn4bx7znVn1ujQpLndL2svQB4LqmAB5BTtrnz9QD3K1XFLrZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676211294; a=rsa-sha256; cv=none; b=tf+ZNsbM0WjdAyQaWR0G+pYlInkMfVYm/W3xLQb6SZUQaFRljredF+mfMrF+P6vrJtdeuC MzDoOWXxua4+w+ahefdQqWELq6q2TrhZXJvSiJm7Vgf4/0rF1MPIVApjDa5/jQ35pHjdqn z62y7QFAJOuamDfjmsoIfYJxdlbP0DXtDaSIb9nsmWzRWJZs+4XJwni8m+0H8ULuU/i/bc c/jbmFAdQZR5wU4fJXYLkyez6OlH2654iodexTKfOK7o5SDzmYT1oArG+q5bkapuL9DvXy VzWxO1a6sYIL5KQkaH/1wfvN/w+BkamM1+G1yntN0Ahd7l8581KWjDFKNa0CLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PF8cZ5Cr7zh55; Sun, 12 Feb 2023 14:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31CEEsCe010667; Sun, 12 Feb 2023 14:14:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31CEEs4Z010666; Sun, 12 Feb 2023 14:14:54 GMT (envelope-from git) Date: Sun, 12 Feb 2023 14:14:54 GMT Message-Id: <202302121414.31CEEs4Z010666@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dirk Meyer Subject: git: e69242b2a3a3 - main - mail/raysfilter: fix build for FreeBSD-14 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dinoex X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e69242b2a3a329bc9a80cfb640851f7e4012ac0a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dinoex: URL: https://cgit.FreeBSD.org/ports/commit/?id=e69242b2a3a329bc9a80cfb640851f7e4012ac0a commit e69242b2a3a329bc9a80cfb640851f7e4012ac0a Author: Dirk Meyer AuthorDate: 2023-02-12 14:14:35 +0000 Commit: Dirk Meyer CommitDate: 2023-02-12 14:14:35 +0000 mail/raysfilter: fix build for FreeBSD-14 --- mail/raysfilter/Makefile | 4 +- mail/raysfilter/files/patch-rays-filter.c | 86 ++++++++++++++++++++++++++++--- 2 files changed, 81 insertions(+), 9 deletions(-) diff --git a/mail/raysfilter/Makefile b/mail/raysfilter/Makefile index 320462e9a7e9..f3b5de82425f 100644 --- a/mail/raysfilter/Makefile +++ b/mail/raysfilter/Makefile @@ -1,6 +1,6 @@ PORTNAME= raysfilter PORTVERSION= 1.14 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail MASTER_SITES= LOCAL/dinoex DISTNAME= rays-filter-${PORTVERSION} @@ -13,7 +13,7 @@ LICENSE_FILE= ${WRKSRC}/GNU-public-licence.txt USES= shebangfix CTARGETS+= rays-filter -CFLAGS+= -Wall +CFLAGS+= -Wall -Wno-pointer-sign LIBS+= -lpthread -lmilter SHEBANG_FILES= mf-analyze ETCFILES= header-list.conf mail-filter.conf string-list.conf diff --git a/mail/raysfilter/files/patch-rays-filter.c b/mail/raysfilter/files/patch-rays-filter.c index 5cb780c442c3..b8ee7f3bf8b2 100644 --- a/mail/raysfilter/files/patch-rays-filter.c +++ b/mail/raysfilter/files/patch-rays-filter.c @@ -1,5 +1,5 @@ ---- rays-filter.c.orig Thu Mar 8 13:41:20 2001 -+++ rays-filter.c Wed Oct 27 15:38:15 2004 +--- rays-filter.c.orig 2001-03-08 12:41:20 UTC ++++ rays-filter.c @@ -65,8 +65,8 @@ #include #include @@ -21,7 +21,7 @@ /* Data Structures ** -@@ -326,6 +328,7 @@ +@@ -326,6 +328,7 @@ static int open_log_file(struct mlfiPriv *priv) syslog(LOG_INFO, "Cannot allocate memory for log file name\n"); else { @@ -29,15 +29,87 @@ if (mktemp(priv->mlfi_fname) == NULL) syslog(LOG_INFO, "Cannot make name for log file\n"); else -@@ -334,6 +337,11 @@ +@@ -334,6 +337,18 @@ static int open_log_file(struct mlfiPriv *priv) if (priv->mlfi_fname == NULL) syslog(LOG_INFO, "Cannot open log file\n"); } +#else -+ priv->mlfi_fp = mkstemp(priv->mlfi_fname); -+ if ( priv->mlfi_fp < 0 ) -+ syslog(LOG_INFO, "Cannot open new log file\n"); ++ int handle; ++ handle = mkstemp(priv->mlfi_fname); ++ if (handle < 0) ++ syslog(LOG_INFO, "Cannot make name for log file\n"); ++ else ++ { ++ priv->mlfi_fp = fdopen(handle, "w"); ++ if ( priv->mlfi_fp == NULL ) ++ syslog(LOG_INFO, "Cannot open log file\n"); ++ } +#endif } return 0; +@@ -489,7 +504,6 @@ sfsistat mlfi_header(SMFICTX *ctx, char *headerf, char + */ + + char *headerf_uc = NULL; +- int i = 0; + + if (MLFIPRIV->mlfi_fp != NULL) + fprintf(MLFIPRIV->mlfi_fp, "%s: %s\r\n", headerf, headerv); +@@ -683,7 +697,7 @@ static int scan_header_block(SMFICTX *ctx, u_char *sta + ** found, checks the header contents against the 'bad_string_list' + */ + +- char *header, *end_of_header, *header_body; ++ char *header, *header_body; + char header_name[HEADER_NAME_SIZE] = "\0"; + size_t header_length = 0, name_length = 0, copy_length = 0; + int status = 0, is_end_of_headers = 0; +@@ -732,8 +746,6 @@ static int scan_buffer(SMFICTX *ctx) + u_char *header_block; + u_char *buffer = MLFIPRIV->buffer; + char *boundary = MLFIPRIV->boundary; +- size_t i = 0; +- size_t used_buffer_length; + int status = 0; + + /* used_buffer_length = strlen(buffer); +@@ -742,7 +754,7 @@ static int scan_buffer(SMFICTX *ctx) + */ + + header_block = buffer; +- while (header_block = (u_char *)strstr(header_block, boundary)) ++ while ((header_block = (u_char *)strstr(header_block, boundary))) + { + status |= scan_header_block(ctx, header_block); + header_block++; +@@ -776,9 +788,9 @@ static int overlap_chunk(SMFICTX *ctx, u_char *bodyp, + } + if (MLFIPRIV->mlfi_fp != NULL) + { +- fprintf(MLFIPRIV->mlfi_fp, "Overlap from previous: %7d\n", ++ fprintf(MLFIPRIV->mlfi_fp, "Overlap from previous: %7zu\n", + overlap_size); +- fprintf(MLFIPRIV->mlfi_fp, "Buffer contains: %7d\n", ++ fprintf(MLFIPRIV->mlfi_fp, "Buffer contains: %7zu\n", + strlen(MLFIPRIV->buffer)); + } + +@@ -802,7 +814,7 @@ static int store_overlap(SMFICTX *ctx, u_char *bodyp, + if (MLFIPRIV->mlfi_fp != NULL) + { + fprintf(MLFIPRIV->mlfi_fp, +- "Overlap to next chunk: %7d\n" ++ "Overlap to next chunk: %7zu\n" + "=====================================================\n", + strlen(MLFIPRIV->overlap)); + } +@@ -831,7 +843,7 @@ sfsistat mlfi_body(SMFICTX *ctx, u_char *bodyp, size_t + "\n=====================================================\n" + "Note inserted by " FILTER_SIGNATURE + "\n-----------------------------------------------------\n" +- "This chunk (bodylen): %7d\n", bodylen); ++ "This chunk (bodylen): %7zu\n", bodylen); + } + } +