mirror of
https://github.com/swiftlang/swift-cmark.git
synced 2026-01-18 17:31:20 +01:00
Add define for GNU glibc extensions
`fdopen`, `strdup`, and `mkstemp` are all extensions. `_DEFAULT_SOURCE` should be enough for this, but apparently not on older glibcs.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
#define _DEFAULT_SOURCE
|
||||
// _GNU_SOURCE is all ISO/POSIX/XOPEN/BSD/SVID + GNU extensions. It also sets
|
||||
// _DEFAULT_SOURCE on newer glibc. We need this for strdup/snprintf/fdopen/etc.
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
Reference in New Issue
Block a user