Yes, if you want to use GNU extensions, you'd probably want to define _GNU_SOURCE before including the header (just as outlined in the man page of sched_setaffinity).