Skip to content
10 changes: 9 additions & 1 deletion source/perflib/err.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@
# define OSSL_PERFLIB_ERR_H
# pragma once

#include <stdarg.h>
# if !defined(_WIN32)

# include <err.h>

# else /* _WIN32 */

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use new lines around include in #if.

# include <stdarg.h>

extern const char *progname;

extern void vwarnx(const char *, va_list);
extern void errx(int, const char *, ...);
extern void warnx(const char *, ...);

# endif /* !_WIN32 */

#endif

4 changes: 2 additions & 2 deletions source/ssl_poll_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#ifdef _WIN32 /* Windows */
# include <winsock2.h>
#else /* Linux/Unix */
# include <err.h>
# include <sys/socket.h>
# include <sys/select.h>
# include <netinet/in.h>
Expand All @@ -54,10 +53,11 @@
#else
# include <windows.h>
# include "perflib/basename.h"
# include "perflib/err.h"
# include "perflib/getopt.h"
#endif /* _WIN32 */

#include "perflib/err.h"

/*
* The code here is based on QUIC poll server found in demos/quic/poll-server
* in OpenSSL source code repository. Here we take the demo one step further
Expand Down