mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
lib: Fix environ on MacOS
On macOS, environ is not declared. Use the workaround suggested here: https://www.gnu.org/software/gnulib/manual/html_node/environ.html Signed-off-by: Antonio Caggiano <quic_acaggian@quicinc.com>
This commit is contained in:
committed by
Richard W.M. Jones
parent
b25bb8b8ba
commit
0bae769f78
@@ -26,6 +26,11 @@
|
||||
#ifndef GUESTFS_INTERNAL_H_
|
||||
#define GUESTFS_INTERNAL_H_
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <crt_externs.h>
|
||||
#define environ (*_NSGetEnviron())
|
||||
#endif // __APPLE__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
Reference in New Issue
Block a user