Skip to content
Snippets Groups Projects
Commit 3094d75b authored by Michael Tüxen's avatar Michael Tüxen
Browse files

glib 2.30 or higher provides gettid().

parent 8e632afd
No related branches found
No related tags found
No related merge requests found
...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment