From cb02a2bdaa71184b28fefdca9059fac995e1dfe8 Mon Sep 17 00:00:00 2001
From: Dave Yeo <dave.r.yeo@gmail.com>
Date: Tue, 12 Mar 2019 21:30:33 -0700
Subject: [PATCH] Build:Add support for libcx on OS/2
Libcx is an extension to libc that adds various networking functions amongst other stuff
Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com>
---
configure | 4 ++++
libavformat/os_support.h | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/configure b/configure
index 908473edf1..dc7671955c 100755
a
|
b
|
HEADERS_LIST=" |
1693 | 1693 | ES2_gl_h |
1694 | 1694 | gsm_h |
1695 | 1695 | io_h |
| 1696 | libcx_net_h |
1696 | 1697 | mach_mach_time_h |
1697 | 1698 | machine_ioctl_bt848_h |
1698 | 1699 | machine_ioctl_meteor_h |
… |
… |
case $target_os in |
4453 | 4454 | SLIB_INSTALL_EXTRA_LIB='$(LIBPREF)$(NAME)_dll.a $(LIBPREF)$(NAME)_dll.lib' |
4454 | 4455 | enable dos_paths |
4455 | 4456 | enable_weak os2threads |
| 4457 | network_extralibs="-lcx" |
4456 | 4458 | ;; |
4457 | 4459 | gnu/kfreebsd) |
4458 | 4460 | add_cppflags -D_BSD_SOURCE |
… |
… |
if ! disabled network; then |
5019 | 5021 | check_func inet_aton $network_extralibs |
5020 | 5022 | |
5021 | 5023 | check_type netdb.h "struct addrinfo" |
| 5024 | check_type libcx/net.h "struct addrinfo" |
5022 | 5025 | check_type netinet/in.h "struct group_source_req" -D_BSD_SOURCE |
5023 | 5026 | check_type netinet/in.h "struct ip_mreq_source" -D_BSD_SOURCE |
5024 | 5027 | check_type netinet/in.h "struct ipv6_mreq" -D_DARWIN_C_SOURCE |
… |
… |
check_header d3d11.h |
5119 | 5122 | check_header dxva.h |
5120 | 5123 | check_header dxva2api.h -D_WIN32_WINNT=0x0600 |
5121 | 5124 | check_header io.h |
| 5125 | check_header libcx/net.h |
5122 | 5126 | check_header libcrystalhd/libcrystalhd_if.h |
5123 | 5127 | check_header mach/mach_time.h |
5124 | 5128 | check_header malloc.h |
diff --git a/libavformat/os_support.h b/libavformat/os_support.h
index a3329119c0..5bdcee40fc 100644
a
|
b
|
static inline int is_dos_path(const char *path) |
95 | 95 | #endif |
96 | 96 | #endif |
97 | 97 | |
| 98 | #if HAVE_LIBCX_NET_H |
| 99 | #include <libcx/net.h> |
| 100 | #endif |
| 101 | |
98 | 102 | #if CONFIG_NETWORK |
99 | 103 | #if !HAVE_SOCKLEN_T |
100 | 104 | typedef int socklen_t; |