mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 23:57:50 +08:00
41 lines
1.2 KiB
Diff
41 lines
1.2 KiB
Diff
|
From 67400fcbd3ab2f7e68a8e7a60139b1b615debae2 Mon Sep 17 00:00:00 2001
|
||
|
From: Nicole Mazzuca <mazzucan@outlook.com>
|
||
|
Date: Wed, 23 Sep 2020 10:27:43 -0700
|
||
|
Subject: [PATCH] correct headers for getcwd
|
||
|
|
||
|
---
|
||
|
fitsio.h | 3 +++
|
||
|
group.c | 2 +-
|
||
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/fitsio.h b/fitsio.h
|
||
|
index ec26d9d..792bb95 100644
|
||
|
--- a/fitsio.h
|
||
|
+++ b/fitsio.h
|
||
|
@@ -39,6 +39,9 @@ SERVICES PROVIDED HEREUNDER."
|
||
|
#define CFITSIO_MAJOR 3
|
||
|
#define CFITSIO_SONAME 5
|
||
|
|
||
|
+/* Required for getcwd() */
|
||
|
+#define _POSIX_C_SOURCE 200112L
|
||
|
+
|
||
|
/* the SONAME is incremented in a new release if the binary shared */
|
||
|
/* library (on linux and Mac systems) is not backward compatible */
|
||
|
/* with the previous release of CFITSIO */
|
||
|
diff --git a/group.c b/group.c
|
||
|
index 9326c57..cec0f6a 100644
|
||
|
--- a/group.c
|
||
|
+++ b/group.c
|
||
|
@@ -24,7 +24,7 @@
|
||
|
#include <direct.h> /* defines the getcwd function on Windows PCs */
|
||
|
#endif
|
||
|
|
||
|
-#if defined(unix) || defined(__unix__) || defined(__unix) || defined(HAVE_UNISTD_H)
|
||
|
+#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(HAVE_UNISTD_H)
|
||
|
#include <unistd.h> /* needed for getcwd prototype on unix machines */
|
||
|
#endif
|
||
|
|
||
|
--
|
||
|
2.24.3 (Apple Git-128)
|
||
|
|