Skip to content

Commit

Permalink
build: Define _DEFAULT_SOURCE to fix compilation warnings with glibc>…
Browse files Browse the repository at this point in the history
…=2.20

Fixes depracation issues for glibc>=2.20 if we define _BSD_SOURCE we
must also define _DEFAULT_SOURCE as well

from tprintf.c

  warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

from astraceroute.c

  warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

Signed-off-by: Arch3y <arch3y@archstrike.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  • Loading branch information
arch3y authored and tklauser committed Apr 17, 2016
1 parent b5d1046 commit a0f448c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions astraceroute.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#define _BSD_SOURCE
#define _DEFAULT_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
Expand Down
1 change: 1 addition & 0 deletions tprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#define _BSD_SOURCE
#define _DEFAULT_SOURCE
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
Expand Down

0 comments on commit a0f448c

Please sign in to comment.