Skip to content

Commit

Permalink
Update libevent from Chromium 114.0.5735.358
Browse files Browse the repository at this point in the history
Issue: 326748668
Reviewed-on: youtube#3429
  • Loading branch information
dahlstrom-g committed Jun 4, 2024
2 parents 104d3cf + 1295f57 commit 678cd4f
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 678 deletions.
35 changes: 11 additions & 24 deletions third_party/libevent/BUILD.gn
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Copyright 2013 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/cronet/config.gni")
import("//build/config/nacl/config.gni")

static_library("libevent") {
Expand Down Expand Up @@ -35,7 +36,11 @@ static_library("libevent") {
]

defines = [ "HAVE_CONFIG_H" ]

if (is_cronet_build) {
include_dirs = [ "compat" ]
} else {
include_dirs = []
}
if (is_starboard) {
sources -= [
"buffer.c",
Expand Down Expand Up @@ -71,44 +76,28 @@ static_library("libevent") {
}
cflags_c = [ "-Wno-unused-function" ]
public_deps = [ "//starboard/common" ]
} else {
} else
if (is_apple) {
sources += [
"kqueue.c",
"mac/config.h",
"mac/event-config.h",
]
include_dirs = [ "mac" ]
include_dirs += [ "mac" ]
} else if (is_linux || is_chromeos) {
sources += [
"epoll.c",
"linux/config.h",
"linux/event-config.h",
]
include_dirs = [ "linux" ]
include_dirs += [ "linux" ]
} else if (is_android) {
sources += [
"android/config.h",
"android/event-config.h",
"epoll.c",
]
include_dirs = [ "android" ]
} else if (is_nacl_nonsfi) {
sources -= [
"evdns.c",
"event_tagging.c",
"evrpc.c",
"http.c",
"select.c",
"signal.c",
]
sources += [
"nacl_nonsfi/config.h",
"nacl_nonsfi/event-config.h",
"nacl_nonsfi/random.c",
"nacl_nonsfi/signal_stub.c",
]
include_dirs = [ "nacl_nonsfi" ]
include_dirs += [ "android" ]
}

if (!is_debug) {
Expand All @@ -117,7 +106,5 @@ static_library("libevent") {
}

configs -= [ "//build/config/compiler:chromium_code" ]
}

configs += [ "//build/config/compiler:no_chromium_code" ]
}
6 changes: 3 additions & 3 deletions third_party/libevent/METADATA
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ description:
third_party {
identifier {
type: "ChromiumVersion"
value: "96.0.4664.219" # from https://chromereleases.googleblog.com/2022/08/long-term-support-channel-update-for_31.html
value: "114.0.5735.358" # from https://chromereleases.googleblog.com/2024/03/long-term-support-channel-update-for_26.html
}
identifier {
type: "Git"
value: "https://chromium.googlesource.com/chromium/src.git"
version: "6a496db5ef7219101beacceca9566367c9cb1a09"
version: "1759c6ae9316996b9f150c0ce9d0ca78a3d15c02"
}
identifier {
type: "UpstreamSubdir"
value: "base/third_party/libevent"
value: "third_party/libevent"
}
last_upgrade_date {
year: 2023
Expand Down
13 changes: 4 additions & 9 deletions third_party/libevent/README.chromium
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@ static library using GYP.
4) The directories WIN32-Code and WIN32-Prj are not included.
5) The configs for android were copied from Linux's which were very close to
android one with the exception of HAVE_FD_MASK and HAVE_STRLCPY.
6) Add files to support building with the PNaCl toolchain. Added
libevent_nacl_nonsfi.gyp for build rule. nacl_nonsfi/config.h and
nacl_nonsfi/event-config.h are derived from linux/ counterparts.
nacl_nonsfi/random.c is also added to provide the random() function,
which is missing in the newlib-based PNaCl toolchain.
7) Stub out signal.c for nacl_helper_nonsfi. socketpair() will be prohibited
by sandbox in nacl_helper_nonsfi.
8) Remove an unnecessary workaround for OS X 10.4 from kqueue.c. It was causing
6) Remove an unnecessary workaround for OS X 10.4 from kqueue.c. It was causing
problems on macOS Sierra.
9) Change buffer.c to not redefine _GNU_SOURCE.
7) Change buffer.c to not redefine _GNU_SOURCE.
8) Change _event_strlcpy in strlcpy.c to not use K&R syntax.
9) Change a bitfield in evhttp.h from int to unsigned int.
20 changes: 8 additions & 12 deletions third_party/libevent/event-config.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file is Chromium-specific, and brings in the appropriate
// event-config.h depending on your platform.

#if defined(STARBOARD)
#include "starboard/event-config.h"
#elif defined(__native_client_nonsfi__)
#include "nacl_nonsfi/event-config.h"
#elif defined(__APPLE__)
#include "mac/event-config.h"
#if defined(__APPLE__)
#include "third_party/libevent/mac/event-config.h"
#elif defined(ANDROID)
#include "android/event-config.h"
#include "third_party/libevent/android/event-config.h"
#elif defined(__linux__)
#include "linux/event-config.h"
#include "third_party/libevent/linux/event-config.h"
#elif defined(__FreeBSD__)
#include "freebsd/event-config.h"
#include "third_party/libevent/freebsd/event-config.h"
#elif defined(__sun)
#include "solaris/event-config.h"
#include "third_party/libevent/solaris/event-config.h"
#elif defined(_AIX)
#include "aix/event-config.h"
#include "third_party/libevent/aix/event-config.h"
#else
#error generate event-config.h for your platform
#endif
4 changes: 2 additions & 2 deletions third_party/libevent/evhttp.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ struct {

struct evbuffer *input_buffer; /* read data */
ev_int64_t ntoread;
int chunked:1, /* a chunked request */
userdone:1; /* the user has sent all data */
unsigned int chunked:1, /* a chunked request */
userdone:1; /* the user has sent all data */

struct evbuffer *output_buffer; /* outgoing post or data */

Expand Down
Loading

0 comments on commit 678cd4f

Please sign in to comment.