[3PP/MacOS] Fix ffmpeg and sha256 build
ffmpeg: macOS uses "_" symbol prefix (Mach-O), has no <malloc.h>, and doesn't support .data.rel.ro sections. Add __APPLE__ guards in ffmpeg-xenia/config.h. sha256: macOS provides endian macros in <machine/endian.h> instead of <endian.h>.
This commit is contained in:
4
third_party/crypto/sha256.cpp
vendored
4
third_party/crypto/sha256.cpp
vendored
@@ -9,8 +9,12 @@
|
|||||||
|
|
||||||
// big endian architectures need #define __BYTE_ORDER __BIG_ENDIAN
|
// big endian architectures need #define __BYTE_ORDER __BIG_ENDIAN
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <machine/endian.h>
|
||||||
|
#else
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace sha256 {
|
namespace sha256 {
|
||||||
|
|
||||||
|
|||||||
13
third_party/ffmpeg-xenia/config.h
vendored
13
third_party/ffmpeg-xenia/config.h
vendored
@@ -11,8 +11,13 @@
|
|||||||
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
|
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
|
||||||
#define CONFIG_THIS_YEAR 2021
|
#define CONFIG_THIS_YEAR 2021
|
||||||
#define av_restrict restrict
|
#define av_restrict restrict
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define EXTERN_PREFIX "_"
|
||||||
|
#define EXTERN_ASM _
|
||||||
|
#else
|
||||||
#define EXTERN_PREFIX ""
|
#define EXTERN_PREFIX ""
|
||||||
#define EXTERN_ASM
|
#define EXTERN_ASM
|
||||||
|
#endif
|
||||||
#define BUILDSUF ""
|
#define BUILDSUF ""
|
||||||
#define HAVE_MMX2 HAVE_MMXEXT
|
#define HAVE_MMX2 HAVE_MMXEXT
|
||||||
#define SWS_MAX_FILTER_SIZE 256
|
#define SWS_MAX_FILTER_SIZE 256
|
||||||
@@ -292,7 +297,11 @@
|
|||||||
#define HAVE_TERMIOS_H 1
|
#define HAVE_TERMIOS_H 1
|
||||||
#define HAVE_SEM_TIMEDWAIT 1
|
#define HAVE_SEM_TIMEDWAIT 1
|
||||||
#define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1
|
#define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define HAVE_SECTION_DATA_REL_RO 0
|
||||||
|
#else
|
||||||
#define HAVE_SECTION_DATA_REL_RO 1
|
#define HAVE_SECTION_DATA_REL_RO 1
|
||||||
|
#endif
|
||||||
#define HAVE_CLOCK_GETTIME 1
|
#define HAVE_CLOCK_GETTIME 1
|
||||||
#define HAVE_FCNTL 1
|
#define HAVE_FCNTL 1
|
||||||
#define HAVE_GETADDRINFO 1
|
#define HAVE_GETADDRINFO 1
|
||||||
@@ -351,7 +360,11 @@
|
|||||||
#define HAVE_THREADS 1
|
#define HAVE_THREADS 1
|
||||||
#define HAVE_ACCESS 1
|
#define HAVE_ACCESS 1
|
||||||
#define HAVE_ISATTY 1
|
#define HAVE_ISATTY 1
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define HAVE_MALLOC_H 0
|
||||||
|
#else
|
||||||
#define HAVE_MALLOC_H 1
|
#define HAVE_MALLOC_H 1
|
||||||
|
#endif
|
||||||
#define HAVE_PRAGMA_DEPRECATED 1
|
#define HAVE_PRAGMA_DEPRECATED 1
|
||||||
|
|
||||||
/* Math functions */
|
/* Math functions */
|
||||||
|
|||||||
Reference in New Issue
Block a user