Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
bda7a546
Commit
bda7a546
authored
Aug 19, 2018
by
zyearn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix clang predefined macros issue in Apple LLVM version 9.1.0
parent
dd2f3d75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
default_variables.cpp
src/bvar/default_variables.cpp
+4
-2
No files found.
src/bvar/default_variables.cpp
View file @
bda7a546
...
...
@@ -20,10 +20,12 @@
#include <sys/resource.h> // getrusage
#include <dirent.h> // dirent
#include <iomanip> // setw
#if defined(
OS_MACOSX
)
#if defined(
__APPLE__
)
#include <libproc.h>
#include <sys/resource.h>
#else
#endif
#include "butil/time.h"
#include "butil/memory/singleton_on_pthread_once.h"
#include "butil/scoped_lock.h"
...
...
@@ -444,7 +446,7 @@ static bool read_proc_io(ProcIO* s) {
memset
(
s
,
0
,
sizeof
(
ProcIO
));
static
pid_t
pid
=
getpid
();
rusage_info_current
rusage
;
if
(
proc_pid_rusage
(
pid
,
RUSAGE_INFO_CURRENT
,
(
void
**
)
&
rusage
)
!=
0
)
{
if
(
proc_pid_rusage
(
pid
,
RUSAGE_INFO_CURRENT
,
(
void
**
)
&
rusage
)
!=
0
)
{
PLOG
(
WARNING
)
<<
"Fail to proc_pid_rusage"
;
return
false
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment