diff --git a/base/BUILD.gn b/base/BUILD.gn index 98c9ab74d5c..4f7df1214cc 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -1805,7 +1805,7 @@ component("base") { ] } - if (is_cobalt && enable_cobalt_hacks && is_starboard) { + if (is_cobalt && enable_cobalt_linux_hacks) { # Find a way to fix the offending customizations instead. configs -= [ "//build/config/compiler:prevent_unsafe_narrowing" ] } diff --git a/build/build_config.h b/build/build_config.h index ea63cd86ede..28120d2722f 100644 --- a/build/build_config.h +++ b/build/build_config.h @@ -290,10 +290,10 @@ #define BUILDFLAG_INTERNAL_COBALT_IS_RELEASE_BUILD() (0) #endif -#if defined(ENABLE_BUILDFLAG_ENABLE_COBALT_HACKS) -#define BUILDFLAG_INTERNAL_ENABLE_COBALT_HACKS() (1) +#if defined(ENABLE_BUILDFLAG_ENABLE_COBALT_LINUX_HACKS) +#define BUILDFLAG_INTERNAL_ENABLE_COBALT_LINUX_HACKS() (1) #else -#define BUILDFLAG_INTERNAL_ENABLE_COBALT_HACKS() (0) +#define BUILDFLAG_INTERNAL_ENABLE_COBALT_LINUX_HACKS() (0) #endif #if defined(ENABLE_BUILFLAG_IS_ANDROIDTV) diff --git a/cobalt/build/configs/BUILD.gn b/cobalt/build/configs/BUILD.gn index 59d456cab35..eaf81a9ca84 100644 --- a/cobalt/build/configs/BUILD.gn +++ b/cobalt/build/configs/BUILD.gn @@ -63,8 +63,8 @@ config("buildflag_defines") { if (cobalt_is_release_build) { defines += [ "ENABLE_BUILDFLAG_COBALT_IS_RELEASE_BUILD" ] } - if (enable_cobalt_hacks) { - defines += [ "ENABLE_BUILDFLAG_ENABLE_COBALT_HACKS" ] + if (enable_cobalt_linux_hacks) { + defines += [ "ENABLE_BUILDFLAG_ENABLE_COBALT_LINUX_HACKS" ] } if (is_androidtv) { defines += [ "ENABLE_BUILFLAG_IS_ANDROIDTV" ] diff --git a/cobalt/build/configs/hacks.gni b/cobalt/build/configs/hacks.gni index 75775f7db20..622c7e17d13 100644 --- a/cobalt/build/configs/hacks.gni +++ b/cobalt/build/configs/hacks.gni @@ -15,5 +15,5 @@ declare_args() { # Allows for the explicit tracking of changes that should be addressed in a # timely fashion. Should not be used for most permanent or long-term changes. - enable_cobalt_hacks = is_cobalt + enable_cobalt_linux_hacks = is_cobalt && is_starboard } diff --git a/starboard/shared/linux/system_network_status.cc b/starboard/shared/linux/system_network_status.cc index e7fbeeae628..98516235fa6 100644 --- a/starboard/shared/linux/system_network_status.cc +++ b/starboard/shared/linux/system_network_status.cc @@ -45,9 +45,9 @@ bool GetOnlineStatus(bool* is_online_ptr, int netlink_fd) { sa.nl_pid = getpid(); int bind_result = bind(netlink_fd, (struct sockaddr*)&sa, sizeof(sa)); // TODO(cobalt, b/371272304): Re-enable -#if !BUILDFLAG(ENABLE_COBALT_HACKS) +#if !BUILDFLAG(ENABLE_COBALT_LINUX_HACKS) SB_DCHECK(bind_result == 0); -#endif // !BUILDFLAG(ENABLE_COBALT_HACKS) +#endif // !BUILDFLAG(ENABLE_COBALT_LINUX_HACKS) char buf[8192]; struct iovec iov;