!74 Fix function undeclared,incompatible pointer and parameter lack in 'add-testcases-for-event.c-apis.patch',support clang build
From: @yuncang123 Reviewed-by: @dillon_chen Signed-off-by: @dillon_chen
This commit is contained in:
commit
2e3fb3cf30
25
0004-fix-function-undeclared.patch
Normal file
25
0004-fix-function-undeclared.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 319c98ee6462ecc890e6a7163b0d02690235caae Mon Sep 17 00:00:00 2001
|
||||
From: yuncang123 <1050706328@qq.com>
|
||||
Date: Fri, 30 Aug 2024 22:52:18 +0800
|
||||
Subject: [PATCH] fix function undeclared
|
||||
|
||||
---
|
||||
test/regress.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/test/regress.c b/test/regress.c
|
||||
index 08c30fa..bd42f4a 100644
|
||||
--- a/test/regress.c
|
||||
+++ b/test/regress.c
|
||||
@@ -75,6 +75,8 @@
|
||||
#include "regress.gen.h"
|
||||
#endif
|
||||
|
||||
+#include "iocp-internal.h"
|
||||
+
|
||||
evutil_socket_t pair[2];
|
||||
int test_ok;
|
||||
int called;
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -214,8 +214,8 @@ index 08c30fa..0704b46 100644
|
||||
+ int n_cpus = 4;
|
||||
+
|
||||
+ cfg = event_config_new();
|
||||
+ event_config_set_num_cpus_hint(cfg, 4);
|
||||
+ tt_assert(4 == cfg->n_cpus_hint);
|
||||
+ event_config_set_num_cpus_hint(cfg, n_cpus);
|
||||
+ tt_assert(n_cpus == cfg->n_cpus_hint);
|
||||
+end:
|
||||
+ if (cfg)
|
||||
+ event_config_free(cfg);
|
||||
@ -227,7 +227,7 @@ index 08c30fa..0704b46 100644
|
||||
+ struct basic_test_data *data = arg;
|
||||
+ struct event_base *base = data->base;
|
||||
+#ifndef _WIN32
|
||||
+ int res = event_base_start_iocp_(base);
|
||||
+ int res = event_base_start_iocp_(base,0);
|
||||
+ tt_int_op(res, ==, -1);
|
||||
+ event_base_stop_iocp_(base);
|
||||
+#endif
|
||||
@ -243,8 +243,8 @@ index 08c30fa..0704b46 100644
|
||||
+ BASIC(event_del_noblock, TT_FORK|TT_NEED_BASE),
|
||||
+ BASIC(event_del_block, TT_FORK|TT_NEED_BASE),
|
||||
+ BASIC(event_get_events, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR),
|
||||
+ BASIC(event_config_set_max_dispatch_interval, TT_FORK|TT_NEED_BASE),
|
||||
+ BASIC(event_config_set_num_cpus_hint, TT_FORK|TT_NEED_BASE),
|
||||
+ LEGACY(event_config_set_max_dispatch_interval, TT_FORK|TT_NEED_BASE),
|
||||
+ LEGACY(event_config_set_num_cpus_hint, TT_FORK|TT_NEED_BASE),
|
||||
+ BASIC(event_base_stop_iocp_, TT_FORK|TT_NEED_BASE),
|
||||
+
|
||||
/* Some converted-over tests */
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
Name: libevent
|
||||
Version: 2.1.12
|
||||
Release: 12
|
||||
Release: 13
|
||||
Summary: An event notification library
|
||||
|
||||
License: BSD
|
||||
URL: http://libevent.org/
|
||||
Source0: https://github.com/libevent/libevent/releases/download/release-%{version}-stable/libevent-%{version}-stable.tar.gz
|
||||
|
||||
BuildRequires: gcc doxygen openssl-devel
|
||||
BuildRequires: gcc doxygen openssl-devel autoconf automake libtool
|
||||
|
||||
Patch0: libevent-nonettests.patch
|
||||
Patch1: http-add-callback-to-allow-server-to-decline-and-the.patch
|
||||
@ -26,6 +26,8 @@ Patch6004: backport-evutil-don-t-call-memset-before-memcpy.patch
|
||||
Patch6005: 0002-Avoid-calling-read-2-on-eventfd-on-each-event-loop-w.patch
|
||||
Patch6006: backport-Makefile-missing-test-dir.patch
|
||||
|
||||
Patch0004: 0004-fix-function-undeclared.patch
|
||||
|
||||
%description
|
||||
Libevent additionally provides a sophisticated framework for buffered network IO, with support for sockets,
|
||||
filters, rate-limiting, SSL, zero-copy file transmission, and IOCP.
|
||||
@ -86,6 +88,9 @@ rm -f %{buildroot}%{_libdir}/*.la
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 30 2024 yuanchao <1050706328@qq.com> - 2.1.12-13
|
||||
- Fix function undeclared,incompatible pointer and parameter lack in 'add-testcases-for-event.c-apis.patch',support clang build
|
||||
|
||||
* Tue Aug 13 2024 wangjiang <wangjiang37@h-partners.com> - 2.1.12-12
|
||||
- Fix missing test directory creation
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user