Skip to content

Commit

Permalink
do not build unused code and remove uneeded dependency on libm.
Browse files Browse the repository at this point in the history
ok tb@
  • Loading branch information
ericfaurot committed Apr 11, 2021
1 parent 8243b58 commit 79c9d8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
7 changes: 1 addition & 6 deletions usr.sbin/smtpd/smtpd.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: smtpd.h,v 1.666 2021/04/10 06:44:18 eric Exp $ */
/* $OpenBSD: smtpd.h,v 1.667 2021/04/11 07:18:08 eric Exp $ */

/*
* Copyright (c) 2008 Gilles Chehade <[email protected]>
Expand Down Expand Up @@ -1638,11 +1638,6 @@ const char *srs_encode(const char *, const char *);
const char *srs_decode(const char *);


/* ssl_smtpd.c */
void *ssl_mta_init(void *, char *, off_t, const char *);
void *ssl_smtp_init(void *, int);


/* stat_backend.c */
struct stat_backend *stat_backend_lookup(const char *);
void stat_increment(const char *, size_t);
Expand Down
8 changes: 3 additions & 5 deletions usr.sbin/smtpd/smtpd/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.111 2021/03/05 12:37:32 eric Exp $
# $OpenBSD: Makefile,v 1.112 2021/04/11 07:18:08 eric Exp $

.PATH: ${.CURDIR}/..

Expand Down Expand Up @@ -51,8 +51,6 @@ SRCS+= smtp_session.c
SRCS+= smtpd.c
SRCS+= srs.c
SRCS+= ssl.c
SRCS+= ssl_smtpd.c
SRCS+= ssl_verify.c
SRCS+= stat_backend.c
SRCS+= table.c
SRCS+= to.c
Expand Down Expand Up @@ -82,8 +80,8 @@ SRCS+= stat_ramstat.c
MAN= sendmail.8 smtpd.8 smtpd.conf.5 table.5
BINDIR= /usr/sbin

LDADD+= -levent -lutil -ltls -lssl -lcrypto -lm -lz
DPADD+= ${LIBEVENT} ${LIBUTIL} ${LIBTLS} ${LIBSSL} ${LIBCRYPTO} ${LIBM} ${LIBZ}
LDADD+= -levent -lutil -ltls -lssl -lcrypto -lz
DPADD+= ${LIBEVENT} ${LIBUTIL} ${LIBTLS} ${LIBSSL} ${LIBCRYPTO} ${LIBZ}

CFLAGS+= -fstack-protector-all
CFLAGS+= -I${.CURDIR}/..
Expand Down
8 changes: 1 addition & 7 deletions usr.sbin/smtpd/ssl.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ssl.h,v 1.22 2021/03/05 12:37:32 eric Exp $ */
/* $OpenBSD: ssl.h,v 1.23 2021/04/11 07:18:08 eric Exp $ */
/*
* Copyright (c) 2013 Gilles Chehade <[email protected]>
*
Expand Down Expand Up @@ -65,9 +65,3 @@ int ssl_load_pkey(const void *, size_t, char *, off_t,
int ssl_ctx_fake_private_key(SSL_CTX *, const void *, size_t,
char *, off_t, X509 **, EVP_PKEY **);
char *ssl_pubkey_hash(const char *, off_t);

/* ssl_privsep.c */
int ssl_by_mem_ctrl(X509_LOOKUP *, int, const char *, long, char **);

/* ssl_verify.c */
int ssl_check_name(X509 *, const char *, int *);

0 comments on commit 79c9d8a

Please sign in to comment.