pkgsrc-WIP-changes archive

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

dma: Build fixes for MacOS



Module Name:	pkgsrc-wip
Committed By:	Philip Dodd <orange.spyderman%gmail.com@localhost>
Pushed By:	orange.spyderman
Date:		Fri Nov 20 11:43:18 2026 +0000
Changeset:	82b5ad455595bc2a2d817fd09161651f0fbf95d7

Modified Files:
	dma/distinfo
	dma/patches/patch-dma.c
	dma/patches/patch-dma.h
	dma/patches/patch-dns.c
	dma/patches/patch-spool.c

Log Message:
dma: Build fixes for MacOS

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=82b5ad455595bc2a2d817fd09161651f0fbf95d7

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

diffstat:
 dma/distinfo              |  8 ++++----
 dma/patches/patch-dma.c   | 28 +++++++++++++++++++---------
 dma/patches/patch-dma.h   | 17 ++++++++++++++---
 dma/patches/patch-dns.c   | 18 ++++++++++++++----
 dma/patches/patch-spool.c | 21 ++++++++++++++++-----
 5 files changed, 67 insertions(+), 25 deletions(-)

diffs:
diff --git a/dma/distinfo b/dma/distinfo
index 9979a7ef12..73ef6dcd41 100644
--- a/dma/distinfo
+++ b/dma/distinfo
@@ -4,8 +4,8 @@ BLAKE2s (dma-0.14.tar.gz) = 12d3e184851f64fe856cf79a01789b7d18fa05eeb0b03955b3f3
 SHA512 (dma-0.14.tar.gz) = c3ef94bb6f8fca64af673be392b9ae7f151bcfefb2996683dee101f15d777912f8ff5ecc9442c9c70e6d530db53baa4d71ff379018fb62632c85a8a61cc4b407
 Size (dma-0.14.tar.gz) = 37572 bytes
 SHA1 (patch-Makefile) = e8db07f69c7f80c4faf39c26747aaf2211895a00
-SHA1 (patch-dma.c) = bfd81f7e343d9d75a6ef446d04bd30a11ccf0672
-SHA1 (patch-dma.h) = c1d57229ec790f5f11a18f277c19e0ba1cdcfdd4
-SHA1 (patch-dns.c) = 5f8a7adb8b1ca379ab8b837e56ca044d7699d2f1
+SHA1 (patch-dma.c) = be9e8fe53d808c6249802827de08de85efce15e1
+SHA1 (patch-dma.h) = 1bb7e0b081d7bc4eaeefff86fb09cdafd310de10
+SHA1 (patch-dns.c) = bb5b404558e7136e3d61971be5e774ac9e47814a
 SHA1 (patch-mail.c) = b5397243763d2283cab33b1aa5d55cfd9ef4792e
-SHA1 (patch-spool.c) = 9094f7e106d7c3f2b97a064eee4087d1ad5b78bc
+SHA1 (patch-spool.c) = 6276822ba9bedb6ca82887342ec88b98de29e661
diff --git a/dma/patches/patch-dma.c b/dma/patches/patch-dma.c
index c75a8eb924..74ce767f9a 100644
--- a/dma/patches/patch-dma.c
+++ b/dma/patches/patch-dma.c
@@ -2,9 +2,11 @@ $NetBSD$
 
 Rename queue to dma_queue because the struct is already defined in SunOS.
 
+Use st_mtime for the queue timeout on macOS.
+
 --- dma.c.orig	2016-02-07 12:41:49.000000000 +0000
 +++ dma.c
-@@ -54,6 +54,7 @@
+@@ -55,6 +55,7 @@
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
@@ -12,7 +14,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  #include <syslog.h>
  #include <unistd.h>
  
-@@ -94,7 +95,7 @@ sighup_handler(int signo)
+@@ -96,7 +97,7 @@
  }
  
  static char *
@@ -21,7 +23,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  {
  	const char *addr;
  	const char *from_user = NULL;
-@@ -153,7 +154,7 @@ read_aliases(void)
+@@ -181,7 +182,7 @@
  }
  
  static int
@@ -30,7 +32,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  {
  	struct alias *al;
          struct stritem *sit;
-@@ -173,7 +174,7 @@ do_alias(struct queue *queue, const char
+@@ -201,7 +202,7 @@
  }
  
  int
@@ -39,7 +41,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  {
  	struct qitem *it, *tit;
  	struct passwd *pw;
-@@ -240,7 +241,7 @@ out:
+@@ -268,7 +269,7 @@
  }
  
  static struct qitem *
@@ -48,7 +50,16 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  {
  	struct sigaction sa;
  	struct qitem *it;
-@@ -372,7 +373,7 @@ bounce:
+@@ -368,7 +369,7 @@
+ 			exit(EX_SOFTWARE);
+ 		}
+ 		if (gettimeofday(&now, NULL) == 0 &&
+-		    (now.tv_sec - st.st_mtim.tv_sec > MAX_TIMEOUT)) {
++		    (now.tv_sec - st.st_mtime > MAX_TIMEOUT)) {
+ 			snprintf(errmsg, sizeof(errmsg),
+ 				 "Could not deliver for the last %d seconds. Giving up.",
+ 				 MAX_TIMEOUT);
+@@ -400,7 +401,7 @@
  }
  
  void
@@ -57,7 +68,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  {
  	struct qitem *it;
  
-@@ -385,7 +386,7 @@ run_queue(struct queue *queue)
+@@ -413,7 +414,7 @@
  }
  
  static void
@@ -66,8 +77,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  {
  	struct qitem *it;
  	int locked = 0;	/* XXX */
-@@ -421,8 +422,8 @@ main(int argc, char **argv)
- {
+@@ -450,7 +451,7 @@
  	struct sigaction act;
  	char *sender = NULL;
  	char *own_name = NULL;
diff --git a/dma/patches/patch-dma.h b/dma/patches/patch-dma.h
index f2aeef558e..07d4638e90 100644
--- a/dma/patches/patch-dma.h
+++ b/dma/patches/patch-dma.h
@@ -2,9 +2,11 @@ $NetBSD$
 
 Rename queue to dma_queue because the struct is already defined in SunOS.
 
+Use NS_MAXDNAME for macOS compatibility.
+
 --- dma.h.orig	2016-02-07 12:41:49.000000000 +0000
 +++ dma.h
-@@ -118,7 +118,7 @@ struct qitem {
+@@ -120,7 +120,7 @@
  };
  LIST_HEAD(queueh, qitem);
  
@@ -13,7 +15,16 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  	struct queueh queue;
  	char *id;
  	FILE *mailf;
-@@ -205,16 +205,16 @@ int base64_decode(const char *, void *);
+@@ -156,7 +156,7 @@
+ 
+ 
+ struct mx_hostentry {
+-	char		host[MAXDNAME];
++	char		host[NS_MAXDNAME];
+ 	char		addr[INET6_ADDRSTRLEN];
+ 	int		pref;
+ 	struct addrinfo	ai;
+@@ -218,16 +218,16 @@
  /* dma.c */
  #define EXPAND_ADDR	1
  #define EXPAND_WILDCARD	2
@@ -36,7 +47,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  int flushqueue_since(unsigned int);
  int flushqueue_signal(void);
  
-@@ -223,7 +223,7 @@ int deliver_local(struct qitem *);
+@@ -236,7 +236,7 @@
  
  /* mail.c */
  void bounce(struct qitem *, const char *);
diff --git a/dma/patches/patch-dns.c b/dma/patches/patch-dns.c
index 4c87bd183f..4e94233e39 100644
--- a/dma/patches/patch-dns.c
+++ b/dma/patches/patch-dns.c
@@ -2,19 +2,29 @@ $NetBSD$
 
 Include sysmacros.h for roundup is required on SunOS.
 
+Use NS_MAXDNAME for macOS compatibility.
+
 --- dns.c.orig	2016-02-07 12:41:49.000000000 +0000
 +++ dns.c
-@@ -41,8 +41,13 @@
+@@ -42,7 +42,12 @@
  #include <netdb.h>
  #include <resolv.h>
  #include <string.h>
 +#include <strings.h>
  #include <stdlib.h>
- 
++
 +#if defined(__sun)
 +#include <sys/sysmacros.h>
 +#endif
-+
+ 
  #include "dma.h"
  
- static int
+@@ -131,7 +136,7 @@
+ int
+ dns_get_mx_list(const char *host, int port, struct mx_hostentry **he, int no_mx)
+ {
+-	char outname[MAXDNAME];
++	char outname[NS_MAXDNAME];
+ 	ns_msg msg;
+ 	ns_rr rr;
+ 	const char *searchhost;
diff --git a/dma/patches/patch-spool.c b/dma/patches/patch-spool.c
index ceee28449e..4443580f9e 100644
--- a/dma/patches/patch-spool.c
+++ b/dma/patches/patch-spool.c
@@ -1,6 +1,8 @@
 $NetBSD$
 
-Rename queue to dma_queue because the struct is already defined in SunOS. 
+Rename queue to dma_queue because the struct is already defined in SunOS.
+
+Use st_mtime for the flush interval on macOS.
 
 --- spool.c.orig	2019-08-20 09:52:52.000000000 +0000
 +++ spool.c
@@ -13,7 +15,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  {
  	char fn[PATH_MAX+1];
  	struct stat st;
-@@ -154,10 +154,10 @@ writequeuef(struct qitem *it)
+@@ -154,10 +154,10 @@
  }
  
  static struct qitem *
@@ -26,7 +28,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  	FILE *queuef = NULL;
  	char *s;
  	char *queueid = NULL, *sender = NULL, *addr = NULL;
-@@ -232,7 +232,7 @@ out:
+@@ -232,7 +232,7 @@
  }
  
  int
@@ -35,7 +37,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  {
  	struct stat st;
  	struct qitem *it;
-@@ -279,7 +279,7 @@ delfiles:
+@@ -279,7 +279,7 @@
  }
  
  int
@@ -44,7 +46,7 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  {
  	struct stat sb;
  	struct qitem *it;
-@@ -385,7 +385,7 @@ fail:
+@@ -385,7 +385,7 @@
  }
  
  void
@@ -53,3 +55,12 @@ Rename queue to dma_queue because the struct is already defined in SunOS.
  {
  	struct qitem *it;
  
+@@ -419,7 +419,7 @@
+ 		return (0);
+ 
+ 	/* Did the flush file get touched within the last period seconds? */
+-	if (st.st_mtim.tv_sec + period >= now.tv_sec)
++	if (st.st_mtime + period >= now.tv_sec)
+ 		return (1);
+ 	else
+ 		return (0);


Home | Main Index | Thread Index | Old Index