diff --git a/meson.build b/meson.build index a85fc304..0556b1ed 100644 --- a/meson.build +++ b/meson.build @@ -136,6 +136,11 @@ if host_machine.system() != 'netbsd' add_project_arguments('-D_POSIX_C_SOURCE=201710L', language: 'c') endif +if host_machine.system() == 'darwin' + # See https://github.com/ximion/appstream/issues/551 + add_project_arguments('-D_DARWIN_C_SOURCE', language: 'c') +endif + if cc.get_id() == 'clang' # Clang doesn't understand autofree helpers on GMutexLocker and thinks # these variables are irrelevant, so this warning when used with Clang diff --git a/src/as-system-info.c b/src/as-system-info.c index 8e5592d4..f0f0c64f 100644 --- a/src/as-system-info.c +++ b/src/as-system-info.c @@ -47,12 +47,6 @@ #include #include -#if defined(__APPLE__) -typedef unsigned int u_int; -typedef unsigned char u_char; -typedef unsigned short u_short; -#endif - #if defined(__linux__) #include #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)