Skip to content

Commit

Permalink
Bug Fix: Wrong GLIBC Version Check
Browse files Browse the repository at this point in the history
  • Loading branch information
Theldus committed Nov 30, 2019
1 parent ecb0c4f commit 1f486cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/include/line.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
#define _POSIX_C_SOURCE 200809L
#define _XOPEN_SOURCE 700

#if defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 10
#if defined(__GLIBC__) && \
(__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 10) )

#define _GNU_SOURCE
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ char *pt_readmemory(pid_t child, uint64_t addr, size_t len)
* use the tradional (and way slower) ptrace approach.
*/
#if defined(__linux__) && defined(__GLIBC__) \
&& __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 15
&& (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 15))

struct iovec local[1]; /* IO Vector Local. */
struct iovec remote[1]; /* IO Vector Remote. */
Expand Down

0 comments on commit 1f486cc

Please sign in to comment.