Skip to content

Commit

Permalink
upstream: lots of things were relying on libcrypto headers to
Browse files Browse the repository at this point in the history
transitively include various system headers (mostly stdlib.h); include them
explicitly

OpenBSD-Commit-ID: 5b522f4f2d844f78bf1cc4f3f4cc392e177b2080
  • Loading branch information
djmdjm committed Sep 6, 2019
1 parent d05aaaa commit be02d7c
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 17 deletions.
3 changes: 2 additions & 1 deletion auth-options.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: auth-options.c,v 1.87 2019/09/03 08:32:11 djm Exp $ */
/* $OpenBSD: auth-options.c,v 1.88 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2018 Damien Miller <[email protected]>
*
Expand All @@ -19,6 +19,7 @@

#include <sys/types.h>

#include <stdlib.h>
#include <netdb.h>
#include <pwd.h>
#include <stdlib.h>
Expand Down
3 changes: 2 additions & 1 deletion auth.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: auth.c,v 1.139 2019/06/28 13:35:04 deraadt Exp $ */
/* $OpenBSD: auth.c,v 1.140 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
Expand Down Expand Up @@ -32,6 +32,7 @@

#include <netinet/in.h>

#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_PATHS_H
Expand Down
3 changes: 2 additions & 1 deletion auth2-chall.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: auth2-chall.c,v 1.50 2018/07/11 18:55:11 markus Exp $ */
/* $OpenBSD: auth2-chall.c,v 1.51 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2001 Per Allansson. All rights reserved.
Expand Down Expand Up @@ -28,6 +28,7 @@

#include <sys/types.h>

#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
Expand Down
3 changes: 2 additions & 1 deletion auth2-hostbased.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: auth2-hostbased.c,v 1.40 2019/01/19 21:43:56 djm Exp $ */
/* $OpenBSD: auth2-hostbased.c,v 1.41 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
Expand Down Expand Up @@ -27,6 +27,7 @@

#include <sys/types.h>

#include <stdlib.h>
#include <pwd.h>
#include <string.h>
#include <stdarg.h>
Expand Down
5 changes: 4 additions & 1 deletion auth2-kbdint.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: auth2-kbdint.c,v 1.9 2018/07/09 21:35:50 markus Exp $ */
/* $OpenBSD: auth2-kbdint.c,v 1.10 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
Expand Down Expand Up @@ -29,6 +29,9 @@

#include <stdarg.h>

#include <stdlib.h>
#include <stdio.h>

#include "xmalloc.h"
#include "packet.h"
#include "hostfile.h"
Expand Down
3 changes: 2 additions & 1 deletion auth2-passwd.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: auth2-passwd.c,v 1.16 2018/07/09 21:35:50 markus Exp $ */
/* $OpenBSD: auth2-passwd.c,v 1.17 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
Expand Down Expand Up @@ -27,6 +27,7 @@

#include <sys/types.h>

#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
Expand Down
3 changes: 2 additions & 1 deletion auth2-pubkey.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: auth2-pubkey.c,v 1.93 2019/09/03 08:30:47 djm Exp $ */
/* $OpenBSD: auth2-pubkey.c,v 1.94 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
Expand Down Expand Up @@ -28,6 +28,7 @@
#include <sys/types.h>
#include <sys/stat.h>

#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_PATHS_H
Expand Down
3 changes: 2 additions & 1 deletion auth2.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: auth2.c,v 1.156 2019/06/28 05:44:09 deraadt Exp $ */
/* $OpenBSD: auth2.c,v 1.157 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
Expand Down Expand Up @@ -37,6 +37,7 @@
#include <unistd.h>
#include <time.h>

#include "stdlib.h"
#include "atomicio.h"
#include "xmalloc.h"
#include "ssh2.h"
Expand Down
3 changes: 2 additions & 1 deletion hmac.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: hmac.c,v 1.12 2015/03/24 20:03:44 markus Exp $ */
/* $OpenBSD: hmac.c,v 1.13 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2014 Markus Friedl. All rights reserved.
*
Expand All @@ -21,6 +21,7 @@

#include <stdlib.h>
#include <string.h>
#include <stdlib.h>

#include "sshbuf.h"
#include "digest.h"
Expand Down
3 changes: 2 additions & 1 deletion krl.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

/* $OpenBSD: krl.c,v 1.43 2019/06/21 04:21:04 djm Exp $ */
/* $OpenBSD: krl.c,v 1.44 2019/09/06 04:53:27 djm Exp $ */

#include "includes.h"

Expand All @@ -29,6 +29,7 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <stdlib.h>

#include "sshbuf.h"
#include "ssherr.h"
Expand Down
4 changes: 3 additions & 1 deletion log.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: log.h,v 1.23 2018/07/27 12:03:17 markus Exp $ */
/* $OpenBSD: log.h,v 1.24 2019/09/06 04:53:27 djm Exp $ */

/*
* Author: Tatu Ylonen <[email protected]>
Expand All @@ -15,6 +15,8 @@
#ifndef SSH_LOG_H
#define SSH_LOG_H

#include <stdarg.h> /* va_list */

/* Supported syslog facilities and levels. */
typedef enum {
SYSLOG_FACILITY_DAEMON,
Expand Down
1 change: 1 addition & 0 deletions loginrec.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@

#include <netinet/in.h>

#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_PATHS_H
Expand Down
3 changes: 2 additions & 1 deletion mac.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: mac.c,v 1.34 2017/05/08 22:57:38 djm Exp $ */
/* $OpenBSD: mac.c,v 1.35 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
*
Expand Down Expand Up @@ -30,6 +30,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

#include "digest.h"
#include "hmac.h"
Expand Down
3 changes: 2 additions & 1 deletion ssh-keygen.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ssh-keygen.c,v 1.346 2019/09/03 20:51:49 naddy Exp $ */
/* $OpenBSD: ssh-keygen.c,v 1.347 2019/09/06 04:53:27 djm Exp $ */
/*
* Author: Tatu Ylonen <[email protected]>
* Copyright (c) 1994 Tatu Ylonen <[email protected]>, Espoo, Finland
Expand All @@ -24,6 +24,7 @@
#include "openbsd-compat/openssl-compat.h"
#endif

#include <stdint.h>
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
Expand Down
3 changes: 2 additions & 1 deletion ssh-keysign.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ssh-keysign.c,v 1.58 2019/06/14 03:28:19 djm Exp $ */
/* $OpenBSD: ssh-keysign.c,v 1.59 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2002 Markus Friedl. All rights reserved.
*
Expand Down Expand Up @@ -33,6 +33,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
Expand Down
3 changes: 2 additions & 1 deletion ssh-pkcs11-helper.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ssh-pkcs11-helper.c,v 1.19 2019/06/06 05:13:13 otto Exp $ */
/* $OpenBSD: ssh-pkcs11-helper.c,v 1.20 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2010 Markus Friedl. All rights reserved.
*
Expand All @@ -24,6 +24,7 @@

#include "openbsd-compat/sys-queue.h"

#include <stdlib.h>
#include <errno.h>
#include <poll.h>
#include <stdarg.h>
Expand Down
7 changes: 6 additions & 1 deletion ssh_api.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ssh_api.c,v 1.15 2019/01/21 10:38:54 djm Exp $ */
/* $OpenBSD: ssh_api.c,v 1.16 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2012 Markus Friedl. All rights reserved.
*
Expand All @@ -17,6 +17,11 @@

#include "includes.h"

#include <sys/types.h>

#include <stdio.h>
#include <stdlib.h>

#include "ssh_api.h"
#include "compat.h"
#include "log.h"
Expand Down
3 changes: 2 additions & 1 deletion sshbuf-getput-basic.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: sshbuf-getput-basic.c,v 1.8 2019/07/14 23:32:27 djm Exp $ */
/* $OpenBSD: sshbuf-getput-basic.c,v 1.9 2019/09/06 04:53:27 djm Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
Expand All @@ -24,6 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>

#include "ssherr.h"
#include "sshbuf.h"
Expand Down

0 comments on commit be02d7c

Please sign in to comment.