Fix build on macOS

This commit is contained in:
Kovid Goyal 2024-11-24 21:44:48 +05:30
parent a3a0684cf5
commit e5cb67b9b3
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -5,17 +5,10 @@
* Distributed under terms of the GPL3 license.
*/
// We rely on data-types.h including Python.h which defines _DARWIN_C_SOURCE
// which we need for _CS_DARWIN_USER_CACHE_DIR
#include "../data-types.h"
#ifdef __APPLE__
// Needed for _CS_DARWIN_USER_CACHE_DIR
#define _DARWIN_C_SOURCE
#include <unistd.h>
#undef _DARWIN_C_SOURCE
#else
#include <unistd.h>
#endif
#include "launcher.h"
#include "../safe-wrappers.h"
#include <stdbool.h>