Skip to content

Buildfix for dma on SunOS #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <openssl/pem.h>
#include <openssl/rand.h>

#include <strings.h>
#include <syslog.h>

#include "dma.h"
Expand Down
15 changes: 8 additions & 7 deletions dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <syslog.h>
#include <unistd.h>

Expand Down Expand Up @@ -94,7 +95,7 @@ sighup_handler(int signo)
}

static char *
set_from(struct queue *queue, const char *osender)
set_from(struct dma_queue *queue, const char *osender)
{
const char *addr;
char *sender;
Expand Down Expand Up @@ -153,7 +154,7 @@ read_aliases(void)
}

static int
do_alias(struct queue *queue, const char *addr)
do_alias(struct dma_queue *queue, const char *addr)
{
struct alias *al;
struct stritem *sit;
Expand All @@ -173,7 +174,7 @@ do_alias(struct queue *queue, const char *addr)
}

int
add_recp(struct queue *queue, const char *str, int expand)
add_recp(struct dma_queue *queue, const char *str, int expand)
{
struct qitem *it, *tit;
struct passwd *pw;
Expand Down Expand Up @@ -240,7 +241,7 @@ add_recp(struct queue *queue, const char *str, int expand)
}

static struct qitem *
go_background(struct queue *queue)
go_background(struct dma_queue *queue)
{
struct sigaction sa;
struct qitem *it;
Expand Down Expand Up @@ -372,7 +373,7 @@ deliver(struct qitem *it)
}

void
run_queue(struct queue *queue)
run_queue(struct dma_queue *queue)
{
struct qitem *it;

Expand All @@ -385,7 +386,7 @@ run_queue(struct queue *queue)
}

static void
show_queue(struct queue *queue)
show_queue(struct dma_queue *queue)
{
struct qitem *it;
int locked = 0; /* XXX */
Expand Down Expand Up @@ -421,7 +422,7 @@ main(int argc, char **argv)
{
struct sigaction act;
char *sender = NULL;
struct queue queue;
struct dma_queue queue;
int i, ch;
int nodot = 0, showq = 0, queue_only = 0;
int recp_from_header = 0;
Expand Down
16 changes: 8 additions & 8 deletions dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ struct qitem {
};
LIST_HEAD(queueh, qitem);

struct queue {
struct dma_queue {
struct queueh queue;
char *id;
FILE *mailf;
Expand Down Expand Up @@ -205,16 +205,16 @@ int base64_decode(const char *, void *);
/* dma.c */
#define EXPAND_ADDR 1
#define EXPAND_WILDCARD 2
int add_recp(struct queue *, const char *, int);
void run_queue(struct queue *);
int add_recp(struct dma_queue *, const char *, int);
void run_queue(struct dma_queue *);

/* spool.c */
int newspoolf(struct queue *);
int linkspool(struct queue *);
int load_queue(struct queue *);
int newspoolf(struct dma_queue *);
int linkspool(struct dma_queue *);
int load_queue(struct dma_queue *);
void delqueue(struct qitem *);
int acquirespool(struct qitem *);
void dropspool(struct queue *, struct qitem *);
void dropspool(struct dma_queue *, struct qitem *);
int flushqueue_since(unsigned int);
int flushqueue_signal(void);

Expand All @@ -223,7 +223,7 @@ int deliver_local(struct qitem *);

/* mail.c */
void bounce(struct qitem *, const char *);
int readmail(struct queue *, int, int);
int readmail(struct dma_queue *, int, int);

/* util.c */
const char *hostname(void);
Expand Down
5 changes: 5 additions & 0 deletions dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@
#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
Expand Down
1 change: 1 addition & 0 deletions local.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <stdint.h>
#include <stdio.h>
#include <syslog.h>
#include <strings.h>
#include <unistd.h>

#include "dma.h"
Expand Down
7 changes: 4 additions & 3 deletions mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <errno.h>
#include <inttypes.h>
#include <signal.h>
#include <strings.h>
#include <syslog.h>
#include <unistd.h>

Expand All @@ -44,7 +45,7 @@
void
bounce(struct qitem *it, const char *reason)
{
struct queue bounceq;
struct dma_queue bounceq;
char line[1000];
size_t pos;
int error;
Expand Down Expand Up @@ -160,7 +161,7 @@ struct parse_state {
* XXX local addresses will need treatment
*/
static int
parse_addrs(struct parse_state *ps, char *s, struct queue *queue)
parse_addrs(struct parse_state *ps, char *s, struct dma_queue *queue)
{
char *addr;

Expand Down Expand Up @@ -342,7 +343,7 @@ parse_addrs(struct parse_state *ps, char *s, struct queue *queue)
}

int
readmail(struct queue *queue, int nodot, int recp_from_header)
readmail(struct dma_queue *queue, int nodot, int recp_from_header)
{
struct parse_state parse_state;
char line[1000]; /* by RFC2822 */
Expand Down
13 changes: 7 additions & 6 deletions spool.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <inttypes.h>
#include <unistd.h>
#include <syslog.h>
#include <strings.h>

#include "dma.h"

Expand All @@ -69,7 +70,7 @@
*/

int
newspoolf(struct queue *queue)
newspoolf(struct dma_queue *queue)
{
char fn[PATH_MAX+1];
struct stat st;
Expand Down Expand Up @@ -151,10 +152,10 @@ writequeuef(struct qitem *it)
}

static struct qitem *
readqueuef(struct queue *queue, char *queuefn)
readqueuef(struct dma_queue *queue, char *queuefn)
{
char line[1000];
struct queue itmqueue;
struct dma_queue itmqueue;
FILE *queuef = NULL;
char *s;
char *queueid = NULL, *sender = NULL, *addr = NULL;
Expand Down Expand Up @@ -229,7 +230,7 @@ readqueuef(struct queue *queue, char *queuefn)
}

int
linkspool(struct queue *queue)
linkspool(struct dma_queue *queue)
{
struct stat st;
struct qitem *it;
Expand Down Expand Up @@ -276,7 +277,7 @@ linkspool(struct queue *queue)
}

int
load_queue(struct queue *queue)
load_queue(struct dma_queue *queue)
{
struct stat sb;
struct qitem *it;
Expand Down Expand Up @@ -382,7 +383,7 @@ acquirespool(struct qitem *it)
}

void
dropspool(struct queue *queue, struct qitem *keep)
dropspool(struct dma_queue *queue, struct qitem *keep)
{
struct qitem *it;

Expand Down