Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Limkilde Svendsen
relibc
Commits
463c9f38
Commit
463c9f38
authored
6 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Fix issue with RUSAGE constants not being in C headers if negative
parent
9c27110d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/bits/sys/resource.h
+9
-0
9 additions, 0 deletions
include/bits/sys/resource.h
src/sys_resource/cbindgen.toml
+1
-0
1 addition, 0 deletions
src/sys_resource/cbindgen.toml
src/sys_resource/src/lib.rs
+5
-4
5 additions, 4 deletions
src/sys_resource/src/lib.rs
with
15 additions
and
4 deletions
include/bits/sys/resource.h
0 → 100644
+
9
−
0
View file @
463c9f38
#ifndef _BITS_SYS_RESOURCE_H
#define _BITS_SYS_RESOURCE_H
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN (-1)
#define RUSAGE_BOTH (-2)
#define RUSAGE_THREAD 1
#endif
/* _BITS_SYS_RESOURCE_H */
This diff is collapsed.
Click to expand it.
src/sys_resource/cbindgen.toml
+
1
−
0
View file @
463c9f38
sys_includes
=
[
"sys/types.h"
,
"stdint.h"
,
"sys/time.h"
]
include_guard
=
"_SYS_RESOURCE_H"
trailer
=
"#include <bits/sys/resource.h>"
language
=
"C"
# WORKAROUND:
...
...
This diff is collapsed.
Click to expand it.
src/sys_resource/src/lib.rs
+
5
−
4
View file @
463c9f38
...
...
@@ -9,10 +9,11 @@ extern crate sys_time;
use
platform
::
types
::
*
;
use
sys_time
::
timeval
;
pub
const
RUSAGE_SELF
:
c_int
=
0
;
pub
const
RUSAGE_CHILDREN
:
c_int
=
-
1
;
pub
const
RUSAGE_BOTH
:
c_int
=
-
2
;
pub
const
RUSAGE_THREAD
:
c_int
=
1
;
// Exported in bits file
const
RUSAGE_SELF
:
c_int
=
0
;
const
RUSAGE_CHILDREN
:
c_int
=
-
1
;
const
RUSAGE_BOTH
:
c_int
=
-
2
;
const
RUSAGE_THREAD
:
c_int
=
1
;
type
rlim_t
=
u64
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment