Advertisement
rickyrick2000

gettid doesn't compile for old glibc

Aug 25th, 2022
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. ubuntu@VM-48-15-ubuntu:~$ ldd --version
  2. ldd (Ubuntu EGLIBC 2.19-0ubuntu6.13) 2.19
  3. Copyright (C) 2014 Free Software Foundation, Inc.
  4. This is free software; see the source for copying conditions. There is NO
  5. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  6. Written by Roland McGrath and Ulrich Drepper.
  7.  
  8. ubuntu@VM-48-15-ubuntu:~$ gcc -g -Wall -o test test.c
  9. test.c: In function ‘main’:
  10. test.c:7:2: warning: implicit declaration of function ‘gettid’ [-Wimplicit-function-declaration]
  11. pid_t a = gettid();
  12. ^
  13. /tmp/ccxkbKZH.o: In function `main':
  14. /home/ubuntu/test.c:7: undefined reference to `gettid'
  15. collect2: error: ld returned 1 exit status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement