aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--icepack/icepack.cc3
-rw-r--r--icetime/icetime.cc3
2 files changed, 6 insertions, 0 deletions
diff --git a/icepack/icepack.cc b/icepack/icepack.cc
index 4eb0305..b5db4c5 100644
--- a/icepack/icepack.cc
+++ b/icepack/icepack.cc
@@ -16,7 +16,10 @@
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//
+#if !defined(_WIN32) && !defined(_GNU_SOURCE)
+// for vasprintf()
#define _GNU_SOURCE
+#endif
#include <set>
#include <tuple>
diff --git a/icetime/icetime.cc b/icetime/icetime.cc
index 1d0549c..affc56d 100644
--- a/icetime/icetime.cc
+++ b/icetime/icetime.cc
@@ -14,7 +14,10 @@
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//
+#if !defined(_WIN32) && !defined(_GNU_SOURCE)
+// for vasprintf()
#define _GNU_SOURCE
+#endif
#include <stdio.h>
#include <stdlib.h>