gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 236/335: More GNU/Linux fixes


From: gnunet
Subject: [libmicrohttpd] 236/335: More GNU/Linux fixes
Date: Sat, 27 Jul 2024 22:02:12 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to tag stf-m2
in repository libmicrohttpd.

commit 6c4b62584721908c9761a80ac3f194e6fab01098
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Jul 14 14:12:19 2024 +0200

    More GNU/Linux fixes
---
 src/include/microhttpd2.h                          | 4 ++--
 src/include/microhttpd2_generated_daemon_options.h | 4 ++--
 src/include/microhttpd2_portability.h              | 2 +-
 src/mhd2/daemon_add_conn.c                         | 3 +++
 src/mhd2/daemon_start.c                            | 4 ++--
 src/mhd2/response_add_header.c                     | 1 +
 src/mhd2/response_destroy.c                        | 2 ++
 src/mhd2/response_from.c                           | 6 +++++-
 src/mhd2/stream_funcs.c                            | 3 ++-
 src/mhd2/stream_process_request.c                  | 2 ++
 10 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
index 4c304c5e..3a1776be 100644
--- a/src/include/microhttpd2.h
+++ b/src/include/microhttpd2.h
@@ -3539,7 +3539,7 @@ If no listen socket optins (#MHD_D_OPTION_BIND_PORT(), 
#MHD_D_OPTION_BIND_SA(),
 struct MHD_DaemonOptionAndValue
 MHD_D_OPTION_BIND_PORT (
   enum MHD_AddressFamily af,
-  uint_fast16_t port
+  uint_least16_t port
   );
 
 /**
@@ -7832,7 +7832,7 @@ union MHD_DaemonInfoFixedData
   /**
    * Port number
    */
-  uint_fast16_t v_port;
+  uint_least16_t v_port;
 
   /**
    * Unused member.
diff --git a/src/include/microhttpd2_generated_daemon_options.h 
b/src/include/microhttpd2_generated_daemon_options.h
index a43d1d02..27123cf9 100644
--- a/src/include/microhttpd2_generated_daemon_options.h
+++ b/src/include/microhttpd2_generated_daemon_options.h
@@ -381,7 +381,7 @@ struct MHD_DaemonOptionValueBind
    * port to use, 0 to let system assign any free port,
    * ignored if @a af is #MHD_AF_NONE
    */
-  uint_fast16_t v_port;
+  uint_least16_t v_port;
 
 };
 
@@ -1556,7 +1556,7 @@ If no listen socket optins (#MHD_D_OPTION_BIND_PORT(), 
#MHD_D_OPTION_BIND_SA(),
 static MHD_INLINE struct MHD_daemonOptionAndValue
 MHD_D_OPTION_BIND_PORT (
   enum MHD_AddressFamily af,
-  uint_fast16_t port
+  uint_least16_t port
   )
 {
   struct MHD_DaemonOptionAndValue opt_val;
diff --git a/src/include/microhttpd2_portability.h 
b/src/include/microhttpd2_portability.h
index a934ff2f..44af752d 100644
--- a/src/include/microhttpd2_portability.h
+++ b/src/include/microhttpd2_portability.h
@@ -5,7 +5,7 @@ MHD_C_DECLRATIONS_START_HERE_
 // FIXME: Move this block to the main header for higher visibility?
 
 /* If generic headers don't work on your platform, include headers which define
-   'va_list', 'size_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t',
+   'va_list', 'size_t', 'uint_least16_t', 'uint_fast32_t', 'uint_fast64_t',
    'struct sockaddr', and then "#define MHD_HAVE_SYS_HEADERS_INCLUDED" before
    including "microhttpd2.h".
    When 'MHD_HAVE_SYS_HEADERS_INCLUDED' is defined the following "standard"
diff --git a/src/mhd2/daemon_add_conn.c b/src/mhd2/daemon_add_conn.c
index aff75a54..41933e2a 100644
--- a/src/mhd2/daemon_add_conn.c
+++ b/src/mhd2/daemon_add_conn.c
@@ -43,6 +43,9 @@
 #include "sys_sockets_headers.h"
 
 #include <string.h>
+#ifdef MHD_USE_EPOLL
+#  include <sys/epoll.h>
+#endif
 
 #include "compat_calloc.h"
 
diff --git a/src/mhd2/daemon_start.c b/src/mhd2/daemon_start.c
index d8d94313..11b9a868 100644
--- a/src/mhd2/daemon_start.c
+++ b/src/mhd2/daemon_start.c
@@ -1813,7 +1813,7 @@ add_itc_and_listen_to_monitoring (struct MHD_Daemon 
*restrict d)
         reg_event.events = EPOLLIN;
         reg_event.data.u64 = (uint64_t) mhd_SOCKET_REL_MARKER_LISTEN; /* 
uint64_t is used in the epoll header */
         if (0 != epoll_ctl (d->events.data.epoll.e_fd, EPOLL_CTL_ADD,
-                            d->net.listen.fd, reg_event))
+                            d->net.listen.fd, &reg_event))
         {
           MHD_LOG_MSG (d, MHD_SC_EPOLL_ADD_DAEMON_FDS_FAILURE, \
                        "Failed to add listening fd to the epoll monitoring.");
@@ -2016,7 +2016,7 @@ set_connections_total_limits (struct MHD_Daemon *restrict 
d,
       if (MHD_INVALID_SOCKET != d->net.listen.fd)
         --limit_by_num; /* One FD is used for the listening socket */
       if ((num_worker_daemons > limit_by_num) ||
-          (limit_by_num > d->net.cfg.max_fd_num) /* Underflow */)
+          (limit_by_num > (unsigned int) d->net.cfg.max_fd_num) /* Underflow 
*/)
       {
         if (d->net.cfg.max_fd_num == s->fd_number_limit)
         {
diff --git a/src/mhd2/response_add_header.c b/src/mhd2/response_add_header.c
index b8751ba3..b466cca6 100644
--- a/src/mhd2/response_add_header.c
+++ b/src/mhd2/response_add_header.c
@@ -31,6 +31,7 @@
 #include "mhd_locks.h"
 
 #include <string.h>
+#include "sys_malloc.h"
 
 #include "mhd_public_api.h"
 
diff --git a/src/mhd2/response_destroy.c b/src/mhd2/response_destroy.c
index defde693..c5fe4505 100644
--- a/src/mhd2/response_destroy.c
+++ b/src/mhd2/response_destroy.c
@@ -31,6 +31,8 @@
 #include "mhd_assert.h"
 #include "mhd_atomic_counter.h"
 
+#include "sys_malloc.h"
+
 #include "mhd_public_api.h"
 
 #include "response_add_header.h"
diff --git a/src/mhd2/response_from.c b/src/mhd2/response_from.c
index dbc73866..744200cb 100644
--- a/src/mhd2/response_from.c
+++ b/src/mhd2/response_from.c
@@ -29,6 +29,8 @@
 
 #include "response_from.h"
 
+#include <string.h>
+
 #include "sys_bool_type.h"
 #include "sys_base_types.h"
 
@@ -81,7 +83,9 @@ response_create_basic (enum MHD_HTTP_StatusCode sc,
   return NULL; /* Failure exit point */
 }
 
-MHD_INTERNAL MHD_FN_PAR_NONNULL_ (1) void
+
+MHD_INTERNAL
+MHD_FN_PAR_NONNULL_ (1) void
 mhd_response_deinit_content_data (struct MHD_Response *restrict r)
 {
   mhd_assert (mhd_RESPONSE_CONTENT_DATA_INVALID != r->cntn_dtype);
diff --git a/src/mhd2/stream_funcs.c b/src/mhd2/stream_funcs.c
index 580dbafc..1084e074 100644
--- a/src/mhd2/stream_funcs.c
+++ b/src/mhd2/stream_funcs.c
@@ -25,9 +25,10 @@
  */
 
 #include "mhd_sys_options.h"
+#include "stream_funcs.h"
 #include "mhd_connection.h"
+#include <string.h>
 #include "mhd_public_api.h"
-#include "stream_funcs.h"
 #include "mhd_assert.h"
 #include "mhd_mempool.h"
 #include "mhd_str.h"
diff --git a/src/mhd2/stream_process_request.c 
b/src/mhd2/stream_process_request.c
index 19bf5e11..d731ad37 100644
--- a/src/mhd2/stream_process_request.c
+++ b/src/mhd2/stream_process_request.c
@@ -35,6 +35,8 @@
 #include "sys_bool_type.h"
 #include "sys_base_types.h"
 
+#include "sys_malloc.h"
+
 #include "mhd_str_types.h"
 #include "mhd_str_macros.h"
 #include "mhd_str.h"

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]