summaryrefslogtreecommitdiff
path: root/libgphoto2
diff options
context:
space:
mode:
authorRafaƂ Hirsz <rafal@hirsz.co>2021-01-29 07:54:08 +0100
committerGitHub <noreply@github.com>2021-01-29 07:54:08 +0100
commitfde666be126c07d2f50c79f6d49182b2c6c54a42 (patch)
treea2c1177f428c430217db58199a3fd9486b1ca156 /libgphoto2
parentfeef6d1524317be457dbf78ebae41913f22389b5 (diff)
downloadlibgphoto2-fde666be126c07d2f50c79f6d49182b2c6c54a42.tar.gz
Add _DARWIN_C_SOURCE to most files that use string.h (#615)
This change makes it possible to build libgphoto2 on macOS.
Diffstat (limited to 'libgphoto2')
-rw-r--r--libgphoto2/gphoto2-abilities-list.c1
-rw-r--r--libgphoto2/gphoto2-file.c1
-rw-r--r--libgphoto2/gphoto2-widget.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/libgphoto2/gphoto2-abilities-list.c b/libgphoto2/gphoto2-abilities-list.c
index 09364d56e..0657e2f41 100644
--- a/libgphoto2/gphoto2-abilities-list.c
+++ b/libgphoto2/gphoto2-abilities-list.c
@@ -21,6 +21,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
+#define _DARWIN_C_SOURCE
#include "config.h"
#include <gphoto2/gphoto2-abilities-list.h>
diff --git a/libgphoto2/gphoto2-file.c b/libgphoto2/gphoto2-file.c
index da84f328c..ae057a8c9 100644
--- a/libgphoto2/gphoto2-file.c
+++ b/libgphoto2/gphoto2-file.c
@@ -26,6 +26,7 @@
*/
#define _POSIX_SOURCE
#define _DEFAULT_SOURCE
+#define _DARWIN_C_SOURCE
#include "config.h"
#include <gphoto2/gphoto2-file.h>
diff --git a/libgphoto2/gphoto2-widget.c b/libgphoto2/gphoto2-widget.c
index 1a7f57e56..53447f64b 100644
--- a/libgphoto2/gphoto2-widget.c
+++ b/libgphoto2/gphoto2-widget.c
@@ -20,6 +20,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
+#define _DARWIN_C_SOURCE
#include "config.h"
#include <gphoto2/gphoto2-widget.h>