Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Packetdrill_tarr_ext
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Stefan Gense
Packetdrill_tarr_ext
Commits
3094d75b
Commit
3094d75b
authored
5 years ago
by
Michael Tüxen
Browse files
Options
Downloads
Patches
Plain Diff
glib 2.30 or higher provides gettid().
parent
8e632afd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gtests/net/packetdrill/run_system_call.c
+5
-1
5 additions, 1 deletion
gtests/net/packetdrill/run_system_call.c
with
5 additions
and
1 deletion
gtests/net/packetdrill/run_system_call.c
+
5
−
1
View file @
3094d75b
...
@@ -121,11 +121,15 @@ static int check_sctp_sndrcvinfo(struct sctp_sndrcvinfo_expr *expr,
...
@@ -121,11 +121,15 @@ static int check_sctp_sndrcvinfo(struct sctp_sndrcvinfo_expr *expr,
#endif
#endif
#if defined(linux)
#if defined(linux)
/* Provide a wrapper for the Linux gettid() system call (glibc does not). */
/* Provide a wrapper for the Linux gettid() system call
* (glibc only provides it in version 2.30 or higher).
*/
#if (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 30))
static
pid_t
gettid
(
void
)
static
pid_t
gettid
(
void
)
{
{
return
syscall
(
__NR_gettid
);
return
syscall
(
__NR_gettid
);
}
}
#endif
/* Read a whole file into the given buffer of the given length. */
/* Read a whole file into the given buffer of the given length. */
static
void
read_whole_file
(
const
char
*
path
,
char
*
buffer
,
int
max_bytes
)
static
void
read_whole_file
(
const
char
*
path
,
char
*
buffer
,
int
max_bytes
)
...
...
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