From 85499c66e296cdab04174a1874868954119c7de3 Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Mon, 25 Nov 2024 13:23:44 -0800 Subject: [PATCH] revise gflags portability namespaces Summary: Let `folly::gflags` be an alias to the true gflags namespace if gflags is available. Reviewed By: Gownta Differential Revision: D65899780 fbshipit-source-id: 7e050d5268f484f92b58d179005c4ce79f3cee52 --- proxygen/httpclient/samples/H3Datagram/H3DatagramClient.cpp | 4 ++-- proxygen/httpclient/samples/curl/CurlClientMain.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/proxygen/httpclient/samples/H3Datagram/H3DatagramClient.cpp b/proxygen/httpclient/samples/H3Datagram/H3DatagramClient.cpp index 7ef747ea7d..375654a3be 100644 --- a/proxygen/httpclient/samples/H3Datagram/H3DatagramClient.cpp +++ b/proxygen/httpclient/samples/H3Datagram/H3DatagramClient.cpp @@ -147,8 +147,8 @@ class DatagramClient int main(int argc, char* argv[]) { #if FOLLY_HAVE_LIBGFLAGS // Enable glog logging to stderr by default. - gflags::SetCommandLineOptionWithMode( - "logtostderr", "1", gflags::SET_FLAGS_DEFAULT); + folly::gflags::SetCommandLineOptionWithMode( + "logtostderr", "1", folly::gflags::SET_FLAGS_DEFAULT); #endif folly::init(&argc, &argv, false); diff --git a/proxygen/httpclient/samples/curl/CurlClientMain.cpp b/proxygen/httpclient/samples/curl/CurlClientMain.cpp index 20e78796f1..9d13f8263b 100644 --- a/proxygen/httpclient/samples/curl/CurlClientMain.cpp +++ b/proxygen/httpclient/samples/curl/CurlClientMain.cpp @@ -52,8 +52,8 @@ DEFINE_bool(log_response, int main(int argc, char* argv[]) { #if FOLLY_HAVE_LIBGFLAGS // Enable glog logging to stderr by default. - gflags::SetCommandLineOptionWithMode( - "logtostderr", "1", gflags::SET_FLAGS_DEFAULT); + folly::gflags::SetCommandLineOptionWithMode( + "logtostderr", "1", folly::gflags::SET_FLAGS_DEFAULT); #endif auto _ = folly::Init(&argc, &argv, false);