mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-21 12:05:00 +00:00
Configure feature test macros in meson
Refs #2807 <https://github.com/Genymobile/scrcpy/pull/2807> Co-authored-by: RipleyTom <RipleyTom@users.noreply.github.com>
This commit is contained in:
parent
2d6a96776c
commit
95769eb87b
3 changed files with 8 additions and 10 deletions
|
@ -44,11 +44,19 @@ if host_machine.system() == 'windows'
|
|||
'src/sys/win/file.c',
|
||||
'src/sys/win/process.c',
|
||||
]
|
||||
add_project_arguments('-D_WIN32_WINNT=0x0600', language: 'c')
|
||||
add_project_arguments('-DWINVER=0x0600', language: 'c')
|
||||
else
|
||||
src += [
|
||||
'src/sys/unix/file.c',
|
||||
'src/sys/unix/process.c',
|
||||
]
|
||||
add_project_arguments('-D_POSIX_C_SOURCE=200809L', language: 'c')
|
||||
add_project_arguments('-D_XOPEN_SOURCE=700', language: 'c')
|
||||
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
||||
if host_machine.system() == 'darwin'
|
||||
add_project_arguments('-D_DARWIN_C_SOURCE', language: 'c')
|
||||
endif
|
||||
endif
|
||||
|
||||
v4l2_support = host_machine.system() == 'linux'
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
#ifndef COMPAT_H
|
||||
#define COMPAT_H
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#define _XOPEN_SOURCE 700
|
||||
#define _GNU_SOURCE
|
||||
#ifdef __APPLE__
|
||||
# define _DARWIN_C_SOURCE
|
||||
#endif
|
||||
|
||||
#include <libavformat/version.h>
|
||||
#include <SDL2/SDL_version.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
// <https://devblogs.microsoft.com/oldnewthing/20111216-00/?p=8873>
|
||||
#define _WIN32_WINNT 0x0600 // For extended process API
|
||||
|
||||
#include "util/process.h"
|
||||
|
||||
#include <processthreadsapi.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue