Use tup and fix _GNU_SOURCE warning