Skip to content

Commit

Permalink
compat-util: add _DEFAULT_SOURCE define
Browse files Browse the repository at this point in the history
glibc has deprecated the use of _BSD_SOURCE define

  warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

To make it easier to maintain a cross platform source code, that
warning can be suppressed by _DEFAULT_SOURCE.

Define both _BSD_SOURCE and _DEFAULT_SOURCE to clean-up the build.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Sergey Senozhatsky authored and Junio C Hamano committed Sep 15, 2014
1 parent 96db324 commit f978a99
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
#define _ALL_SOURCE 1
#define _GNU_SOURCE 1
#define _BSD_SOURCE 1
#define _DEFAULT_SOURCE 1
#define _NETBSD_SOURCE 1
#define _SGI_SOURCE 1

Expand Down

0 comments on commit f978a99

Please sign in to comment.