aboutsummaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-09-15 18:53:40 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-09-17 11:07:40 +0300
commitc209ce76f7080c8233ba834fbb5ad10a6a2fa803 (patch)
tree7eaa5d191f61c09ee8b2036a328e8185f1c5f5dc /src/examples
parente52c9e246873140da0cefd66bd438d541b1f2a6a (diff)
downloadlibmicrohttpd-c209ce76f7080c8233ba834fbb5ad10a6a2fa803.tar.gz
libmicrohttpd-c209ce76f7080c8233ba834fbb5ad10a6a2fa803.zip
Fixed missing <errno.h> includes
While 'errno' can be defined in various headers, by standard it must be defined in <errno.h> header.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/demo.c1
-rw-r--r--src/examples/demo_https.c1
-rw-r--r--src/examples/digest_auth_example.c1
-rw-r--r--src/examples/fileserver_example_dirs.c1
-rw-r--r--src/examples/fileserver_example_external_select.c1
-rw-r--r--src/examples/suspend_resume_epoll.c1
-rw-r--r--src/examples/upgrade_example.c1
-rw-r--r--src/examples/websocket_chatserver_example.c1
-rw-r--r--src/examples/websocket_threaded_example.c1
9 files changed, 9 insertions, 0 deletions
diff --git a/src/examples/demo.c b/src/examples/demo.c
index edce395d..3134d5ed 100644
--- a/src/examples/demo.c
+++ b/src/examples/demo.c
@@ -43,6 +43,7 @@
43#endif /* MHD_HAVE_LIBMAGIC */ 43#endif /* MHD_HAVE_LIBMAGIC */
44#include <limits.h> 44#include <limits.h>
45#include <ctype.h> 45#include <ctype.h>
46#include <errno.h>
46 47
47#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 48#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
48#undef MHD_CPU_COUNT 49#undef MHD_CPU_COUNT
diff --git a/src/examples/demo_https.c b/src/examples/demo_https.c
index 56c746ca..6658408a 100644
--- a/src/examples/demo_https.c
+++ b/src/examples/demo_https.c
@@ -45,6 +45,7 @@
45#endif /* MHD_HAVE_LIBMAGIC */ 45#endif /* MHD_HAVE_LIBMAGIC */
46#include <limits.h> 46#include <limits.h>
47#include <ctype.h> 47#include <ctype.h>
48#include <errno.h>
48 49
49#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 50#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
50#undef MHD_CPU_COUNT 51#undef MHD_CPU_COUNT
diff --git a/src/examples/digest_auth_example.c b/src/examples/digest_auth_example.c
index db8a1f28..8d5a4041 100644
--- a/src/examples/digest_auth_example.c
+++ b/src/examples/digest_auth_example.c
@@ -27,6 +27,7 @@
27#include "platform.h" 27#include "platform.h"
28#include <microhttpd.h> 28#include <microhttpd.h>
29#include <stdlib.h> 29#include <stdlib.h>
30#include <errno.h>
30 31
31#define PAGE \ 32#define PAGE \
32 "<html><head><title>libmicrohttpd demo</title></head>" \ 33 "<html><head><title>libmicrohttpd demo</title></head>" \
diff --git a/src/examples/fileserver_example_dirs.c b/src/examples/fileserver_example_dirs.c
index 5ec60428..98d2e096 100644
--- a/src/examples/fileserver_example_dirs.c
+++ b/src/examples/fileserver_example_dirs.c
@@ -31,6 +31,7 @@
31#ifdef HAVE_UNISTD_H 31#ifdef HAVE_UNISTD_H
32#include <unistd.h> 32#include <unistd.h>
33#endif 33#endif
34#include <errno.h>
34 35
35 36
36static ssize_t 37static ssize_t
diff --git a/src/examples/fileserver_example_external_select.c b/src/examples/fileserver_example_external_select.c
index 192e00d1..87097529 100644
--- a/src/examples/fileserver_example_external_select.c
+++ b/src/examples/fileserver_example_external_select.c
@@ -28,6 +28,7 @@
28#include <microhttpd.h> 28#include <microhttpd.h>
29#include <sys/stat.h> 29#include <sys/stat.h>
30#include <unistd.h> 30#include <unistd.h>
31#include <errno.h>
31 32
32#define PAGE \ 33#define PAGE \
33 "<html><head><title>File not found</title></head><body>File not found</body></html>" 34 "<html><head><title>File not found</title></head><body>File not found</body></html>"
diff --git a/src/examples/suspend_resume_epoll.c b/src/examples/suspend_resume_epoll.c
index c85d9b7c..49995f5d 100644
--- a/src/examples/suspend_resume_epoll.c
+++ b/src/examples/suspend_resume_epoll.c
@@ -30,6 +30,7 @@
30#include <sys/epoll.h> 30#include <sys/epoll.h>
31#include <sys/timerfd.h> 31#include <sys/timerfd.h>
32#include <limits.h> 32#include <limits.h>
33#include <errno.h>
33 34
34#define TIMEOUT_INFINITE -1 35#define TIMEOUT_INFINITE -1
35 36
diff --git a/src/examples/upgrade_example.c b/src/examples/upgrade_example.c
index 5b57d24e..46acf2a7 100644
--- a/src/examples/upgrade_example.c
+++ b/src/examples/upgrade_example.c
@@ -33,6 +33,7 @@
33#include "platform.h" 33#include "platform.h"
34#include <microhttpd.h> 34#include <microhttpd.h>
35#include <pthread.h> 35#include <pthread.h>
36#include <errno.h>
36 37
37#define PAGE \ 38#define PAGE \
38 "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>" 39 "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>"
diff --git a/src/examples/websocket_chatserver_example.c b/src/examples/websocket_chatserver_example.c
index f01ada43..f4aac7b3 100644
--- a/src/examples/websocket_chatserver_example.c
+++ b/src/examples/websocket_chatserver_example.c
@@ -33,6 +33,7 @@
33#define _CRT_SECURE_NO_WARNINGS 33#define _CRT_SECURE_NO_WARNINGS
34#endif 34#endif
35#include "platform.h" 35#include "platform.h"
36#include <errno.h>
36#include <microhttpd.h> 37#include <microhttpd.h>
37#include <microhttpd_ws.h> 38#include <microhttpd_ws.h>
38#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) 39#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
diff --git a/src/examples/websocket_threaded_example.c b/src/examples/websocket_threaded_example.c
index af036d24..4fcac79b 100644
--- a/src/examples/websocket_threaded_example.c
+++ b/src/examples/websocket_threaded_example.c
@@ -29,6 +29,7 @@
29/* TODO: allow to send large messages. */ 29/* TODO: allow to send large messages. */
30 30
31#include "platform.h" 31#include "platform.h"
32#include <errno.h>
32#include <pthread.h> 33#include <pthread.h>
33#include <microhttpd.h> 34#include <microhttpd.h>
34 35