Skip to content

Commit 8ed3e85

Browse files
committed
Use perflib/err.h unconditionally
Signed-off-by: Eugene Syromiatnikov <[email protected]>
1 parent af6fc94 commit 8ed3e85

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

source/perflib/err.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,21 @@
1111
# define OSSL_PERFLIB_ERR_H
1212
# pragma once
1313

14-
#include <stdarg.h>
14+
# if !defined(_WIN32)
15+
16+
# include <err.h>
17+
18+
# else /* _WIN32 */
19+
20+
# include <stdarg.h>
1521

1622
extern const char *progname;
1723

1824
extern void vwarnx(const char *, va_list);
1925
extern void errx(int, const char *, ...);
2026
extern void warnx(const char *, ...);
2127

28+
# endif /* !_WIN32 */
29+
2230
#endif
2331

source/ssl_poll_perf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#ifdef _WIN32 /* Windows */
3434
# include <winsock2.h>
3535
#else /* Linux/Unix */
36-
# include <err.h>
3736
# include <sys/socket.h>
3837
# include <sys/select.h>
3938
# include <netinet/in.h>
@@ -54,10 +53,11 @@
5453
#else
5554
# include <windows.h>
5655
# include "perflib/basename.h"
57-
# include "perflib/err.h"
5856
# include "perflib/getopt.h"
5957
#endif /* _WIN32 */
6058

59+
#include "perflib/err.h"
60+
6161
/*
6262
* The code here is based on QUIC poll server found in demos/quic/poll-server
6363
* in OpenSSL source code repository. Here we take the demo one step further

0 commit comments

Comments
 (0)