pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mail/opensmtpd-filter-dnsbl



Module Name:    pkgsrc
Committed By:   vins
Date:           Fri Sep  8 21:05:37 UTC 2023

Modified Files:
        pkgsrc/mail/opensmtpd-filter-dnsbl: Makefile distinfo
        pkgsrc/mail/opensmtpd-filter-dnsbl/patches: patch-main.c
Added Files:
        pkgsrc/mail/opensmtpd-filter-dnsbl/patches: patch-compat.h

Log Message:
opensmtpd-filter-dnsbl: fix build following libasr update.

Bump revision.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/opensmtpd-filter-dnsbl/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/mail/opensmtpd-filter-dnsbl/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/mail/opensmtpd-filter-dnsbl/patches/patch-compat.h
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/mail/opensmtpd-filter-dnsbl/patches/patch-main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mail/opensmtpd-filter-dnsbl/Makefile
diff -u pkgsrc/mail/opensmtpd-filter-dnsbl/Makefile:1.2 pkgsrc/mail/opensmtpd-filter-dnsbl/Makefile:1.3
--- pkgsrc/mail/opensmtpd-filter-dnsbl/Makefile:1.2     Tue Sep  5 13:42:32 2023
+++ pkgsrc/mail/opensmtpd-filter-dnsbl/Makefile Fri Sep  8 21:05:37 2023
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2023/09/05 13:42:32 vins Exp $
+# $NetBSD: Makefile,v 1.3 2023/09/08 21:05:37 vins Exp $
 
 DISTNAME=      filter-dnsbl-0.3
 PKGNAME=       ${DISTNAME:S|^|opensmtpd-|}
+PKGREVISION=   1
 CATEGORIES=    mail
 MASTER_SITES=  https://imperialat.at/releases/
 
@@ -14,7 +15,7 @@ DEPENDS+=     opensmtpd-[0-9]*:../../mail/op
 
 USE_BSD_MAKEFILE=      yes
 
-CFLAGS.Linux+=         -D_GNU_SOURCE #strcasestr() 
+CFLAGS.Linux+=         -D_GNU_SOURCE #strcasestr()
 
 SUBST_CLASSES+=                prefix
 SUBST_STAGE.prefix=    pre-configure

Index: pkgsrc/mail/opensmtpd-filter-dnsbl/distinfo
diff -u pkgsrc/mail/opensmtpd-filter-dnsbl/distinfo:1.1 pkgsrc/mail/opensmtpd-filter-dnsbl/distinfo:1.2
--- pkgsrc/mail/opensmtpd-filter-dnsbl/distinfo:1.1     Mon Sep  4 10:32:47 2023
+++ pkgsrc/mail/opensmtpd-filter-dnsbl/distinfo Fri Sep  8 21:05:37 2023
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1 2023/09/04 10:32:47 vins Exp $
+$NetBSD: distinfo,v 1.2 2023/09/08 21:05:37 vins Exp $
 
 BLAKE2s (filter-dnsbl-0.3.tar.gz) = e8bc9b2b504ee74122fd3854548792b9050440b9a3a5d02722af6de670447268
 SHA512 (filter-dnsbl-0.3.tar.gz) = c7b805b05ea7629c87c90146be3a9f375b68542a7b6b781e37ffb842e33b67aca53633a7f4cd6f8befda71cc6e30e9330624f95ee3ce0c84b128c4b1483fee59
 Size (filter-dnsbl-0.3.tar.gz) = 3413 bytes
 SHA1 (patch-Makefile) = 1a262a5860642f965cf6d62c4efddb7515fd121e
-SHA1 (patch-main.c) = b5c7edc0022bfa69268e896df6cf57c48e6484d7
+SHA1 (patch-compat.h) = ba2d347c80efa0467e2655fb5c9e56f451f0199b
+SHA1 (patch-main.c) = 80061610d34ede5d25c6239ba58570fdaaf36af9

Index: pkgsrc/mail/opensmtpd-filter-dnsbl/patches/patch-main.c
diff -u pkgsrc/mail/opensmtpd-filter-dnsbl/patches/patch-main.c:1.1 pkgsrc/mail/opensmtpd-filter-dnsbl/patches/patch-main.c:1.2
--- pkgsrc/mail/opensmtpd-filter-dnsbl/patches/patch-main.c:1.1 Mon Sep  4 10:32:47 2023
+++ pkgsrc/mail/opensmtpd-filter-dnsbl/patches/patch-main.c     Fri Sep  8 21:05:37 2023
@@ -1,6 +1,6 @@
-$NetBSD: patch-main.c,v 1.1 2023/09/04 10:32:47 vins Exp $
+$NetBSD: patch-main.c,v 1.2 2023/09/08 21:05:37 vins Exp $
 
-* Provide an inline definition of pledge().
+* Provide an implementation of recallocarray().
 * Provide compatibility functions for OpenBSD's libevent
   (pulled from OpenSMTD/openbsd-compat).
 
@@ -13,14 +13,45 @@ $NetBSD: patch-main.c,v 1.1 2023/09/04 1
   *
   * Permission to use, copy, modify, and distribute this software for any
   * purpose with or without fee is hereby granted, provided that the above
-@@ -31,6 +32,76 @@
+@@ -30,6 +31,104 @@
+ #include <asr.h>
  
  #include "opensmtpd.h"
- 
-+static inline int  
-+pledge(const char *promises, const char *execpromises)
++#include "compat.h"
++
++void *recallocarray(void *ptr, size_t om, size_t m, size_t n)
 +{
-+        return 0;
++      void *newptr;
++      size_t old_size, new_size;
++
++      if (n && m > -1 / n) {
++              errno = ENOMEM;
++              return 0;
++      }
++      new_size = m * n;
++
++      if (n && om > -1 / n) {
++              errno = EINVAL;
++              return 0;
++      }
++      old_size = om * n;
++
++      newptr = calloc(m, n);
++      if (!newptr)
++              return ptr;
++
++      if (new_size <= old_size) {
++              memcpy((char *) newptr, ptr, new_size);
++      }
++      else {
++              memcpy((char *) newptr, ptr, old_size);
++              memset((char *) newptr + old_size, 0, new_size - old_size);
++      }
++
++      memset(ptr, 0, old_size);
++      free(ptr);
++
++      return newptr;
 +}
 +
 +struct event_asr {
@@ -84,9 +115,6 @@ $NetBSD: patch-main.c,v 1.1 2023/09/04 1
 +      event_del(&eva->ev);
 +      free(eva);
 +}
-+
-+struct asr_query *gethostbyname_async(const char *, void *);
-+
+ 
  struct dnsbl_session;
  
- struct dnsbl_query {

Added files:

Index: pkgsrc/mail/opensmtpd-filter-dnsbl/patches/patch-compat.h
diff -u /dev/null pkgsrc/mail/opensmtpd-filter-dnsbl/patches/patch-compat.h:1.1
--- /dev/null   Fri Sep  8 21:05:37 2023
+++ pkgsrc/mail/opensmtpd-filter-dnsbl/patches/patch-compat.h   Fri Sep  8 21:05:37 2023
@@ -0,0 +1,30 @@
+$NetBSD: patch-compat.h,v 1.1 2023/09/08 21:05:37 vins Exp $
+
+* Provide an inline definition of pledge().
+* Provide function prototypes for recallocarray()
+  and gethostbyname_async().
+
+--- compat.h.orig      2023-09-08 20:40:55.417811491 +0000
++++ compat.h
+@@ -0,0 +1,21 @@
++/*
++ * <unistd.h>
++ */
++
++static inline int
++pledge(const char *promises, const char *execpromises)
++{
++        return 0;
++}
++
++/*
++ * <stdlib.h>
++ */
++
++void *recallocarray (void *, size_t, size_t, size_t);
++
++/*
++ * <asr.h>
++ */
++
++struct asr_query *gethostbyname_async(const char *, void *);



Home | Main Index | Thread Index | Old Index